Re: output Today's date

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

 



gustav@xxxxxxxxxxxxxx wrote:
On Sat, Mar 04, 2006 at 07:01:55PM -0700, Paul Goepfert wrote:

Hi all,

ls there anyway I can set the date to the timezone of the clients
timezone?  For example, if a person opens the web page at 3/6 12:01
EST and another person opens the same page at 3/5 10:01 MST I would
like the date to be the above days on the client computers.  I know
everyone knows this but the way I described this the two people
accessed the webpage at the same time but I want the

correct date for

the client computer to be outputted.

There are some tools that you can detect where the person is
located and and you would be able to use the timezone from
that information. One site I found from a quick google search:

http://www.ip2location.com/


The cheapest and simpliest method would be to use some
javascript to detect the timezone. Or let the user specify
which one he wants to use.

Hi,

Javascripts' Date object has a getTimezoneOffset() method, which returns
the difference between local time and universal time in
minutes.

Jared

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



Hi there!

Yes, Javascript may have a such function, BUT think of the reliability...
It's not sure, that user has the Javascript-functionality turned on, what
happens then?

Best regards
Gustav Wiberg
The IP to location is the best way.
I am not quite sure but is in the HTTP GET header or the headers following then not the timezone included?

I am talking about the Headers the Browser sends.

Greets Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
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