The following code when executed using w3schools’ interactive js environment (here):
var d1=new Date(1306796400000);
document.write("Original form: " + d1);
displays the following message:
Original form: Tue May 31 2011 00:00:00 GMT+0100 (GMT Daylight Time)
But this:
var d1=new Date(1231977600000);
document.write("Original form: " + d1);
displays this message:
Original form: Thu Jan 15 2009 00:00:00 GMT+0000 (GMT Standard Time)
I thought that the millisecond value was just milliseconds since 01/01/1970 in UTC.
But it looks like it contains a flag for time zone.
Can anyone say what the millisecond value format is?
Thanks in advance.
There is no special flag. It’s just Daylight Savings in effect.