Jim Monty wrote: >I can plainly see that DateTime/TimeZone/America/New_York.pm is not >identical to DateTime/TimeZone/EST5EDT.pm, but I don't fully understand >what's going on in the following example or why, exactly, the results >should differ:
"America/New_York" refers to the civil time historically used in New York City, as best the Olson folks can determine it. For the date you tried (which slightly predates the founding of the first European-style settlement in that region) it's using local mean time. "EST5EDT", on the other hand, is a System V-style timezone specification. It specifies that the zone uses a standard time of UT-5h called "EST", a DST of UT-4h called "EDT", and switches between them annually on some unspecified dates that the implementation must guess. For the date you tried it's obliged to pick one or the other of these offsets, and since the usual guesses involve northern-hemisphere chauvinism it's overwhelmingly likely to pick the standard time for a date in December/January. See DT::TZ::SystemV (a separate distribution) for documentation explaining the syntax, although for historical reasons DT::TZ::EST5EDT is implementing "EST5EDT" via an Olson-style observance listing rather than via DT::TZ::SystemV. -zefram