Feature #6437

Marshaling Time preserve utc_offset but doesn't preserve zone

Added by Santiago Pastorino almost 2 years ago. Updated almost 2 years ago.

[ruby-core:45064]
Status:Rejected
Priority:Normal
Assignee:-
Category:-
Target version:-

Description

I was wondering why do we have this in Rails https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/time/marshal.rb#L1-4.
I thought it was something particular of old Ruby versions but the same happens in trunk.

$ ruby -v
ruby 2.0.0dev (2012-05-02 trunk 35517) [x86_64-darwin11.3.0]
$ irb
irb(main):001:0> t = Time.local(2010)
=> 2010-01-01 00:00:00 -0200
irb(main):002:0> t.zone
=> "UYST"
irb(main):003:0> m = Marshal.load(Marshal.dump(t))
=> 2010-01-01 00:00:00 -0200
irb(main):005:0> m.zone
=> nil

I wonder if there's a reason for that or it's a bug or something wrong.


Related issues

Duplicates ruby-trunk - Bug #3035: Time#zone doesn't round-trip Rejected 03/29/2010

History

#1 Updated by Santiago Pastorino almost 2 years ago

Actually this is a dup of #3035

#2 Updated by Eric Hodel almost 2 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF