V
V
Vyacheslav Slinko2013-07-29 15:21:05
JavaScript
Vyacheslav Slinko, 2013-07-29 15:21:05

Time zone issue in OS X 10.8

In OS X 10.8, some time zones differ from those in other operating systems.

For example, the old MSD has a value of +2700 (!)

For this reason, the date count breaks:

var a = new Date(2010, 9, 1); // Fri Oct 01 2010 00:00:00 GMT+0400 (MSK)
a.setMonth(a.getMonth()+1); // Sun Oct 31 2010 01:00:00 GMT+0400 (MSK)


On Linux everything is ok:

var a = new Date(2010, 9, 1); // Fri Oct 01 2010 00:00:00 GMT+0500 (MSK)
a.setMonth(a.getMonth()+1); // Mon Nov 01 2010 00:00:00 GMT+0400 (MSK)


Have you encountered this problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question