Frozen Date objects?

Brendan Eich brendan at mozilla.com
Wed Jul 17 20:29:12 PDT 2013


Norbert Lindenberg wrote:
> On Jul 17, 2013, at 13:58 , Brendan Eich<brendan at mozilla.com>  wrote:
>
>> No, *time* is stored as milliseconds after the epoch in a number (IEEE double).
>>
>> A Date object includes position on planet and timezone politics (see getTimezoneOffset).
>
> No, it doesn't. Any time zone information used by getTimeZoneOffset and other non-UTC Date API is based on time zone information in the environment: the "local time zone" is typically what the user has told the OS to use. A Date object itself only wraps the time value.

No. This is not well-specified by ECMA-262, implementations do crack 
time to date fields in Date instances, and one's timezone can change in 
a running system (say a Firefox OS phone one takes on a plane).

/be


More information about the es-discuss mailing list