Consider this snippet using the latest MooTools Core & More 1.5 (view in jsFiddle):
console.log(new Date().parse('2014-09-20 00:00:00'));
When I run this code, I usually get something along the lines of
Sat Sep 20 2014 00:00:00 GMT+0200 (Central Europe Daylight Time)
However, when I use Chrome (38.0.2125.104 m) or a PyQt 4 WebKit window and use a Russian time zone (anything in Windows with an RTZ in its name), the date is 1 month in the future:
Mon Oct 20 2014 00:00:00 GMT+0300 (Eastern Europe Daylight Time)
This apparently does not occur with Firefox or Internet Explorer, or apparently any non-Russian time zone.
Anybody know why ?
The issue is apparently caused by Chrome bugs 417640 and 420269.
Dates between
2014-01-01 00:00:00(inclusive) and2014-01-01 01:00:00(exclusive) simply do not exist as such, they resolve to2013-12-31 23:00:00-2013-12-31 23:59:59instead.You can reproduce this with an RTZ:
This is because
Date.parse('2014-01-01 00:00:00')yields2013-12-31in the date part due to time zone issues.This bug affects other dates as well because of the way MooTools'
Dateextensions work (initializing dates withyear-01-01 00:00:00and then subsequently setting extracted values, e.g.12:34:56 Sep 25, 2014would be derived like this: