This project is archived and is in readonly mode.
Cannot make zone.parse create given time (DST)
-
Geoff Buesing
- State changed from new to wontfix
If you include the UTC offset and leave out the MSK/MDK from the string, it works:
>> zone = ActiveSupport::TimeZone['Moscow'] => #<ActiveSupport::TimeZone:0x183ec98 @tzinfo=nil, @name="Moscow", @utc_offset=10800> >> zone.parse('2008-10-26 2:00 +0300') => Sun, 26 Oct 2008 02:00:00 MSK +03:00 >> zone.parse('2008-10-26 2:00 +0400') => Sun, 26 Oct 2008 02:00:00 MSD +04:00Here's why:
>> Date._parse('2008-10-26 2:00 +0300') => {:mday=>26, :mon=>10, :zone=>"+0300", :offset=>10800, :year=>2008, :hour=>2, :min=>0} >> Date._parse('2008-10-26 2:00 MSK +0300') => {:mday=>26, :mon=>10, :zone=>"MSK", :year=>2008, :hour=>2, :min=>0}