Reputation: 2153
I get inconsistent timezone based on params to Date():
new Date()
Sun Oct 25 2015 18:10:42 GMT+0200 (IST)
new Date(1445720400)
Sat Jan 17 1970 19:35:20 GMT+0200 (IST)
new Date(144572040000)
Thu Aug 01 1974 09:54:00 GMT+0300 (IDT)
new Date(14457204000000)
Thu Feb 17 2428 20:00:00 GMT+0200 (IST)
I tried reading the docs or finding an explanation to this weirdness, but couldn't. I've checked on both Chrome 46 and Safari 7.1.8, Any ideas?
Upvotes: 2
Views: 127
Reputation: 87
The problem in then you set different time in ms as param for 'new Date()'. And you have different time zones because the Date has been generated in different seasons (Summer's time and Winter's time). It is normal.
Upvotes: 0
Reputation: 2309
Isn't this just daylight savings? One of the dates happened to be in the summer?
Upvotes: 4