Javascript countdown using absolute timezone?

You can use Date.UTC(year,month,day,hours,minutes,seconds,msec)

It operates just like the Date constructor, but returns the timestamp of the arguments at Greenwich time (offset=0) instead of local time.

var localtime=new Date(Date.UTC(year,month,day,hours,minutes,seconds,msec)) 

returns the local time for the UTC time specified.

Everyone (whose clock is set correctly) will end the countdown together.

Leave a Comment