Re: display users local time
| From: | scottrus at ipass dot net | Date: | Tue, 15 Aug 2000 02:50:48 +0000 |
| Subject: | Re: display users local time | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11785@lists.php.net to get a copy of this message | ||
Adrian -
Thanks for the response. I know I can do this with javascript however I'll be supporting
browsers that don't use javascript. I'd like to find a php solution to this. Does anyone
know
of an vars bassed in the http header request that would clue me in to TZ and LANG? Of the two
I'm more
interested in TZ I think since my main goal is to get the date/time correct for the local user.
Thanks.
-- Scott
On Tue, Aug 15, 2000 at 07:33:16AM +0100, Adrian Teasdale wrote:
> Why not just do this with JavaScript?
>
> Here is a script which displays what you are after:
>
> ----- Original Message -----
> From: <scottrus@ipass.net>
> To: php general <php-general@lists.php.net>
> Sent: Monday, August 14, 2000 4:58 PM
> Subject: [PHP] display users local time
>
>
> > Greets all -
> >
> > I seem to be missing something obvious. I want to display the date/time
> according to the users local
> > settings. Best as I can see I need to know two vars to do this, the local
> users LANG and the TZ they are
> > in.
> >
> > Does the browser pass this info in the header somewhere were php can read
> it? I don't want to hard code
> > in to display the time / date in any one region.
> >
> > Once I know the LANG and the TZ I know I can use the setlocale(),
> strftime(), and other date / time
> > functions to manuplate the date / time in to what I want. I'm just missing
> where to get the users local
> > settings from...
> >
> > Thanks for any help.
> >
> > --
> > Scott
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
--
Scott