I'm storing the UTC dates into the DB using:
$utc = gmdate("M d Y h:i:s A");
and then I want to convert the saved UTC date to the client's local time.
How can I do that?
Thanks
date() and localtime() both use the local timezone for the server unless overridden; you can override the timezone used with date_default_timezone_set().
date()
localtime()
date_default_timezone_set()
http://www.php.net/manual/en/function.date-default-timezone-set.php
http://us3.php.net/manual/en/function.date.php
http://php.net/manual/en/function.localtime.php
1.4m articles
1.4m replys
5 comments
57.0k users