RE: [PHP] output Today's date
| From: | gustav at varupiraten dot se | Date: | Mon, 06 Mar 2006 11:57:47 +0000 |
| Subject: | RE: [PHP] output Today's date | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231503@lists.php.net to get a copy of this message | ||
>
>> 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