473,372 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 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 2039
16,027 Expert Mod 8TB
A Google search for "javascript dst" returns some decent enough results, e.g.
DST - Javascript.
Sep 18 '07 #2

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

Similar topics

by: Nathan DeBardeleben | last post by:
This may seem wierd, and I know someone asked this question before but was told they were doing it the hard way. Unlike them, I do not have shell access to the machine where this javascript runs....
by: TJ | last post by:
Hello All, I posted a question a few days ago entitled "Select element with no selected options". Over the course of the discussion, RobG wrote: > This is just an example, it is not really...
by: Jason | last post by:
I have two applications that I wrote that use asp and javascript source files. Recently both of these applications starting acting strange on my test box. Image icons will randomly stop showing...
by: fbwhite | last post by:
I am having an issue (maybe two issues) in my application regarding a stylesheet not loading and I am getting Javascript Errors. If I clean out a client's temporary internet files and then browse...
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript...
by: kenundrum | last post by:
Hey all, I am having an issue with XML/XSLT and JavaScript in my ASP.NET page that I am creating. I first want to apologize if i placed this in the wrong category. Since there were three different...
by: Simon Brooke | last post by:
I'm working on a system which uses Google maps. I want the user to see a map of more or less where (s)he is in the world when (s)he first comes to the system. So the obvious thing seemed to be to...
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, This is an issue that happens to me and everybody else I know and I've never found a way around it. In Visual Studio (currently using 2003 but the same has happened for me in 2005 and...
by: a.bavdhankar | last post by:
Hi, Newbie Question: Applicable to dotnet 2.0 I am getting javasacript error message as Expected ')' but all script works fine on other machine. There is no syntax error in the script but...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.