Re: [PHP] display users local time From: Ahchi Ng (ahchi_ng <email protected>)
Date: 08/15/00

Hi Scott,

You may try this $HTTP_ACCEPT_LANGUAGE to get the language setting.

Bye
Ahchi

--
*********************************
* Email: ahchi <email protected>
* Business web site: http://3store.com
* Personal web site: http://i.am/ahching
*********************************

<scottrus <email protected>> wrote in message news:20000815075048.A18382 <email protected> > 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 <email protected>> > > To: php general <php-general <email protected>> > > 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 <email protected> > > > For additional commands, e-mail: php-general-help <email protected> > > > To contact the list administrators, e-mail: php-list-admin <email protected> > > > > > -- > Scott > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe <email protected> > For additional commands, e-mail: php-general-help <email protected> > To contact the list administrators, e-mail: php-list-admin <email protected> >

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>