RE: [PHP] how to get the local time
[email protected] ("Daevid Vincent")
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
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:[email protected]] > Sent: Monday, March 15, 2010 1:11 PM > To: [email protected] > 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 > ----- >