tags:

views:

19

answers:

2

Right now I am using this Javascript timezone timer: http://www.hashemian.com/tools/javascript-countdown.htm

This works but it will calculate from YOUR computer time. I don't want that. I want a timer that counts down from the timezone I am in (USA EASTERN) so instead of the page loading at THEIR time.. it would finialize the countdown at my time I wish for EVERYWHERE.

Is this possible? Maybe with PHP or jQuery?

note to self: look into this - http://www.minisitegallery.com/blog/php-javascript-countdown-script-with-timezone-setting.html

A: 

Do you have to do it on the client side? You could easily read server time from your PHP code.

Paweł Dyda
Yeah PHP if fine. Whaddya' got? :P
Dan
http://www.php.net/manual/en/function.date.php You can pass timezone as a parameter.
Paweł Dyda
A: 

I made a google gadget to do that here. Basically, you add a time zone at the end when you construct the Date object you are counting from, like so:

var countdownDate = new Date(day + " " + month + " " + year + " " + 
    hour + ":" + minute + ":" + second + " " + ampm + " " + timezone);

For Central Daylight Time I put CDT for the timezone variable. I think it will also take a straight offset from GMT. This depends on the time zone being set properly at the client's computer, but it does work.

Karl Bielefeldt