RE: [PHP] how to get the local time

From: Date: Mon, 15 Mar 2010 21:56:10 +0000
Subject: RE: [PHP] how to get the local time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-302874@lists.php.net to get a copy of this message
You either have to use JS on the client side. Or you store the user's timezone as a preference in their profile and compute using that by setting a TZ variable. Normally you would store all data in mySQL in UTC and then convert on the fly as mentioned above for each user. > -----Original Message----- > From: saeed ahmed [mailto:saeed.sas@gmail.com] > Sent: Monday, March 15, 2010 1:11 PM > To: php-general@lists.php.net > Subject: [PHP] how to get the local time > > hi friends, > > I'm trying to set local time in my php script. I was trying > date and time > function but its always show the server time not local time. > i need help on > this problem. how can i set the local time. i need sweden time zone > ----- > Regards > Saeed Ahmed > http://saeed05.wordpress.com > ----- >

« previous php.general (#302874) next »