Page 1 of 1

Correcting server date and time for different time zones.

Posted: Mon Mar 24, 2003 10:16 am
by Zoram
I was wondering if anyone had a way to display the date and time for a timezone other than the timezone the server is in.

I looked at the localtime() but i don't really get how you would get the time from from the client and i'm not running php4 so it wouldn't work anyways.

Any help?

Posted: Mon Mar 24, 2003 10:20 am
by volka
the time zone is not part of the request-data by default
but take a look at http://www.devguru.com/Technologies/ecmascript/quickref/date.html
  • using javascript you can either send the offset to GMT via getTimezoneOffset() within your request client->server
  • or send all dates server->client as ...parse('xyz GMT') in an clientside script that uses getTimezoneOffset() to create appropriate time-values in the document