Comment 7 for bug 838525

Revision history for this message
Dan Wells (dbw2) wrote :

Some unfortunate information directly from the ECMA standard:

"The implementation of ECMAScript should not try to determine whether the exact time was subject to daylight saving time, but just whether daylight saving time would have been in effect if the current daylight saving time algorithm had been used at the time. This avoids complications such as taking into account the years that the locale observed daylight saving time year round.

If the host environment provides functionality for determining daylight saving time, the implementation of ECMAScript is free to map the year in question to an equivalent year (same leap-year-ness and same starting week day for the year) for which the host environment provides daylight saving time information. The only restriction is that all equivalent years should produce the same result."

So, Javascript (ehem, I mean ECMAScript) Date objects are half-baked for anything but the recent past.

http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf