PDA

View Full Version : countup script



elhaca
10-30-2008, 02:54 PM
I was testing out one of the scripts called Dynamic Countup. On the time it seems that the ime is using central time. Is there a way I can change it to eastern time?

I have typed in the date and leave the time at 12:00 midnight. The all the displays are corrected but only the hour is one hour behind. How do you change the time to move ahead by one hour?

//SYNTAX: myvariable=new dcountup(past_date_and_time_string, "baseunit")
var princeswedding=new dcountup("November 19, 2007 00:00:00", "days")

:confused:

jscheuer1
10-30-2008, 03:32 PM
Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Not knowing exactly which script you mean (please post the link to it in the Dynamic Drive Scripts Library). I can only guess that this is the result of DST interfering in some way. That can usually be remedied by creating another Date Object, and/or using an existing one, setting its date and time to the desired target before extracting its values. But I cannot say for sure without looking at the script, it might even be something else entirely. Are you sure that the clock on your computer is set correctly?

A link to your page would probably help also.

elhaca
10-30-2008, 05:15 PM
I am so sorry John. This is my first time using this forum and kinda stumpled around a little bit. But here is the link that I was looking at http://www.dynamicdrive.com/dynamicindex6/countingup.htm .

I did check the clock on my pc and the clock is correct. I also did change the timezone to central time and the time in the script changed one hour behind from the central time. I'm baffled. -elhaca.

jscheuer1
10-30-2008, 07:55 PM
Nothing to be sorry about really, just trying to get you with the program. I certainly understand being unfamiliar with the forum as a first time user.

I setup this script and it is a matter dealing with DST. However the script appears to 'get it right'. Say you are counting up from an event that occurred during standard time. If the current time is DST, one actual hour less has transpired since the event than one would think merely by looking at the time on the clock. That's because we set the clock ahead one hour for DST, but no hour has passed when we do that. Once clock time returns to standard time, it will all 'add up', but that doesn't change the fact that, even under DST, the actual time elapsed since the event is correct.