471,881 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,881 software developers and data experts.

Javascript DST Issue

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?
Sep 17 '07 #1
1 1989
16,027 Expert Mod 8TB
A Google search for "javascript dst" returns some decent enough results, e.g.
DST - Javascript.
Sep 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Nathan DeBardeleben | last post: by
6 posts views Thread by TJ | last post: by
4 posts views Thread by E | last post: by
16 posts views Thread by Eric | last post: by
33 posts views Thread by Simon Brooke | last post: by
3 posts views Thread by =?Utf-8?B?UGhpbCBKb2huc29u?= | last post: by
1 post views Thread by a.bavdhankar | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.