Actions
Bug #3035
closedTime#zone doesn't round-trip
Description
=begin
Time.now.zone
=> "PDT"
Marshal.load(Marshal.dump(Time.now)).zone
=> nil
=end
Actions
Like0
Like0Like0
Added by bitsweat (Jeremy Daer) about 15 years ago. Updated almost 14 years ago.
Description
=begin
Time.now.zone
=> "PDT"
Marshal.load(Marshal.dump(Time.now)).zone
=> nil
=end
=begin
It's intended.
Time#utc_offset does round-trip but not #zone.
=end
=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