Project

General

Profile

Bug #3035

Time#zone doesn't round-trip

Added by bitsweat (Jeremy Daer) about 10 years ago. Updated almost 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2010-03-14) [x86_64-darwin10.2.0]
Backport:
[ruby-core:29089]

Description

=begin

Time.now.zone
=> "PDT"
Marshal.load(Marshal.dump(Time.now)).zone
=> nil
=end


Related issues

Has duplicate Ruby master - Feature #6437: Marshaling Time preserve utc_offset but doesn't preserve zoneRejected05/16/2012Actions
#1

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

  • Status changed from Open to Rejected

=begin
It's intended.
Time#utc_offset does round-trip but not #zone.
=end

#2

Updated by bitsweat (Jeremy Daer) about 10 years ago

=begin
Ok. I found a good explanation in this thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/22892

I think it would be more pragmatic to include the zone name and fall back to utc_offset. Lossy marshaling is surprising.
=end

Also available in: Atom PDF