Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Daylight saving timezone not recognized

#6574

While the time zone "EST" is recognized, "EDT" isn't.

Time.now.zone # => "EST" last week, "EDT" this week.
Time.now.in_time_zone("EST").to_s # => ".... -0500"
Time.now.in_time_zone("EDT").to_s # => raises an error, see issue 6573

Reported by Marc-André Lafortune · March 14th, 2011 @ 02:57 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Josh Kalderimis
    Josh Kalderimis
    • Tag changed from rails3 activesupport, bug, timezone to active_support, timezone
    • State changed from new to wontfix
    • Importance changed from to Low

    Hi Marc,

    The EST timezone is defined in the TZInfo gem. I looked into it further and EDT is defined but it is called EST5EDT.

    Thanks,

    Josh

    March 15th, 2011 @ 08:53 PM

  2. Marc-André Lafortune
    Marc-André Lafortune

    Thanks for looking it up.

    For the record, EST5EDT is not quite "EDT". It is the same as "Eastern Time (US & Canada)", i.e. EST (UTC-5) in the 'winter', and 'EDT' (UTC-4) in the 'summer'.

    So "EDT" is not an actual timezone, more like the state of a timezone. For instance it would not make any sense to ask for Time.utc(2011,1,1).in_time_zone("EDT"). Note that "EST" is a timezone, used in a few places that do not use Daylight savings time and are (UTC-5) yearlong.

    Sorry for my confusion.

    March 15th, 2011 @ 10:45 PM

  3. Josh Kalderimis
    Josh Kalderimis

    Hey Marc,

    Thanks for the reply and for letting me know what the real issue / solution is.

    Josh

    March 15th, 2011 @ 11:49 PM