Project

General

Profile

Actions

Bug #3035

closed

Time#zone doesn't round-trip

Added by bitsweat (Jeremy Daer) about 12 years ago. Updated about 11 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 1 (0 open1 closed)

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

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

  • Status changed from Open to Rejected

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

Actions #2

Updated by bitsweat (Jeremy Daer) about 12 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

Actions

Also available in: Atom PDF