Countdown timer for different timezones

D

Dirk Hagemann

Hi!

I'd like to implement a countdown timer on a webite. It should show the
months, days, hours, minutes and seconds until a given date and time.
So far it's not really difficult, but this website will be used from
different time zones, what will make a difference of 10 hours, if I use
the time-information from the client. The event will take place at one
fixed moment which is worldwide the same.

Does anyone know a way to solve this time-zone-problem?

Regards and thanks for your ideas
Dirk
 
M

Marc 'BlackJack' Rintsch

Dirk Hagemann said:
I'd like to implement a countdown timer on a webite. It should show the
months, days, hours, minutes and seconds until a given date and time.
So far it's not really difficult, but this website will be used from
different time zones, what will make a difference of 10 hours, if I use
the time-information from the client. The event will take place at one
fixed moment which is worldwide the same.

Does anyone know a way to solve this time-zone-problem?

I don't think there's a reliable way to get the time zone information from
the viewer of the website with just HTTP. So you need a JavaScript
solution I guess. Send the end time as UTC time to the browser an use
JavaScript's `Date` object to display the countdown in local time.

Ciao,
Marc 'BlackJack' Rintsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,114
Latest member
GlucoPremiumReview
Top