Skip to main content
Participant
April 5, 2007
Question

Timezone

  • April 5, 2007
  • 1 reply
  • 129 views
Ok a little background info:

I have a countdown script that reads the server time from a mktime php file (xml type)
It works great UNTIL i change the timezone.

Is it possible to static set the timezone, so it doesnt mather from what timezone the user comes from, it will use the servers timezone??? :)'

Thanx in advance!

CODE:

This topic has been closed for replies.

1 reply

Inspiring
April 5, 2007
Far too much code.

If you are correctly getting the time from a server then you have done what you need to.

Any line like this:

temp_date = new Date (msecs);

Is going to access the user's internal clock.

I would suggest that you do a getTimer() once you have received the correct time from the server. Then everytime you need to know how long has passed since that time was received you just use another getTimer() and do a bit of subtraction. You will then know how many milliseconds have passed since that time and can do your countdown.