Time#local behaves differently during clock change
This is probably not a bug but since it changes previous behavior it should be noted somewhere.
>> ENV['TZ'] = 'Europe/Berlin' => "Europe/Berlin" >> Time.local(2011,10,30,2,0,0).zone => "CET"
>> ENV['TZ'] = 'Europe/Berlin' => "Europe/Berlin" >> Time.local(2011,10,30,2,0,0).zone => "CEST"
So in older Ruby versions the object represents the time after the clock change (within the extra hour), while in Ruby 2.2.0 it represents the time before time is set back.
Updated by akr (Akira Tanaka) over 5 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r49162.
- time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is VTM_ISDST_INITVAL. This bug is introduced at packing struct vtm (r45155). [ruby-core:67345] [Bug #10698] Reported by Boris Ruf.