Status: New
Owner: ----

New issue 2059 by [email protected]: Date.setHours() + 1 cannot pass 25.3.2012
http://code.google.com/p/v8/issues/detail?id=2059

I just discovered this issue.
Result is same for node.js 0.6.13 and Chrome 18.0.1025.142m
extract:

(function() {
  time = new Date('2012-03-23 18:00');
  for (i=0; i < 36; i++) {
    console.log(time.toISOString());
    time.setHours(time.getHours() + 1);
  }
})();

result:
2012-03-23T17:00:00.000Z
2012-03-23T18:00:00.000Z
2012-03-23T19:00:00.000Z
2012-03-23T20:00:00.000Z
2012-03-23T21:00:00.000Z
2012-03-23T22:00:00.000Z
2012-03-23T23:00:00.000Z
2012-03-24T00:00:00.000Z
2012-03-24T01:00:00.000Z
2012-03-24T02:00:00.000Z
2012-03-24T03:00:00.000Z
2012-03-24T04:00:00.000Z
2012-03-24T05:00:00.000Z
2012-03-24T06:00:00.000Z
2012-03-24T07:00:00.000Z
2012-03-24T08:00:00.000Z
2012-03-24T09:00:00.000Z
2012-03-24T10:00:00.000Z
2012-03-24T11:00:00.000Z
2012-03-24T12:00:00.000Z
2012-03-24T13:00:00.000Z
2012-03-24T14:00:00.000Z
2012-03-24T15:00:00.000Z
2012-03-24T16:00:00.000Z
2012-03-24T17:00:00.000Z
2012-03-24T18:00:00.000Z
2012-03-24T19:00:00.000Z
2012-03-24T20:00:00.000Z
2012-03-24T21:00:00.000Z
2012-03-24T22:00:00.000Z
2012-03-24T23:00:00.000Z
2012-03-25T00:00:00.000Z
2012-03-25T00:00:00.000Z
2012-03-25T00:00:00.000Z
2012-03-25T00:00:00.000Z
2012-03-25T00:00:00.000Z

After 25.3.2012 one hour is not added. When you add 2 hours, everything is OK. As I remember, 25.3. was in our country the day, when daylight savings time was changed.
Any suggestion to deal with this?


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to