Re: client time zone?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To get the clients time offset you'll need to use javascript and
date.getTimezoneOffset()

But this idea has a problem. It is that you can never trust that the
clients time is actually correct. You can get the closest to it by
using the server time and offsetting that with the javascript offset
value. But you'll never know if the client has the wrong timezone and
you'll have to deal with timezones that don't have daylight savings
like for instance Iceland :)

- Ólafur Waage

2008/1/6, Per Jessen <per@xxxxxxxxxxxx>:
> jekillen wrote:
>
> > Hello;
> > I am running a server that is using UTC and I want to be able to
> > convert to clients local time in some display presentations.
> > Is this indicated by $_SERVER["REQUEST_TIME"]?
>
> Is there such a value at all?
>
> > If not, is there a way to get the requesting host's
> > time zone so I can offset the servers clock value correctly?
>
> I think you'll need to use javascript.
>
>
> /Per Jessen, Zürich
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux