469,322 Members | 1,067 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

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 1930
acoder
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.