LocalTZA/DaylightSavingTA and timezones that transition at midnight

Andrew Paprocki andrew at ishiboo.com
Fri Sep 6 12:27:50 PDT 2013

Most places in the world transition to/from DST at either 1 or 2am, which
avoids a class of bug that affects only users in the world that transition
at midnight. For example, Chilean users transition this upcoming Sunday at
midnight, which results in:

> var d = new Date(2013, 8, 8) // September 8th
Sat Sep 07 2013 23:00:00 GMT-0400 (CLST)
> d.getDate()

Devs probably expect (right or wrong) that when omitting the time portion
of the constructor and sticking to the date-only local API, the returned
values reflect the values passed to the constructor.

This affects users located in these places whose timezones transition
to/from DST at midnight:
- Brazil
- Chile
- Paraguay
- Iran
- Lebanon
- Syria
- West Bank / Gaza
- Cuba
- Greenland

I'm not sure how often this class of bug bites users or devs in the parts
of the world where this occurs, but has anyone else ever run across this?
This boils down to "ES only has datetime and not date, time, datetime

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130906/fc708866/attachment.html>

More information about the es-discuss mailing list