Javascript Date object uses current os rule for DST.
It will correctly calculate all dates in 2007 year. But it will get incorrect time for previous years with old rules for DST.
For example, in US DST starts in 2006("First Sunday in April" rule) on 2 April 2006a and ends in 29 October 2006.In 2007("Second Sunday in March" rule) start on 11 March 2007.
In javascript:
var date = new Date(2006, march 20);
date.getTime() - will return incorrect time in millis, since it will use new rule for 2007.
How to fix this issue? Or how to make workaround?