/    Sign up×
Community /Pin to ProfileBookmark

Countdown Clock with absolute timing.

I’ve developed a coundown clock giving me days to go before a certain event. But this countdown clock seems to rely on the clock in the visitors PC. If the clock in the vistors PC is set wrong then the countdown number of days is wrong. I’ve seen some PC’s set to 2006.
I’ve searched for script to give me an absolute clock, but everything I use seems to use the clock in the vistitors PC.
Is there some script that doesn’t rely on the PC time but relies on an absolute time? I’ve tried UTC but have had no luck.
Thanks
Bob.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallSep 13.2007 — UTC still relies on the time on the visitors PC only more so because they need to have the timezone and daylight savings flags set correctly as well as the time.

The only way to solve the problem is to have the initial time to be used in the JavaScript defined as a specific value rather than taking the current time from the computer's clock. You make sure that the specific value to start from is the time that you want it to be by setting it via a server side scripting language that runs at the time the page is downloaded. That way you just need to make sure that the server your site is hosted on is set to the correct time or if it isn't use a known offset in the server side processing when setting up the value in the JavaScript code that the server side script creates.
Copy linkTweet thisAlerts:
@ThomoauthorSep 14.2007 — Thanks for suggesting server side scripting Stephen.

I think I've found some good stuff here:

http://scripts.franciscocharrua.com/asp/server-side-countdown-clock.php
×

Success!

Help @Thomo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...