Re: display users local time
| From: | Ahchi Ng | Date: | Tue, 15 Aug 2000 14:24:39 +0000 |
| Subject: | Re: display users local time | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11808@lists.php.net to get a copy of this message | ||
Hi Scott,
You may try this $HTTP_ACCEPT_LANGUAGE to get the language setting.
Bye
Ahchi
--
*********************************
* Email: ahchi@3store.com
* Business web site: http://3store.com
* Personal web site: http://i.am/ahching
*********************************
<scottrus@ipass.net> wrote in message
news:20000815075048.A18382@ipass.net...
> 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
>
> --
> 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
>