Created
March 15, 2013 13:49
-
-
Save galen/5170000 to your computer and use it in GitHub Desktop.
Setting timezones with DateTime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$utc_time = ''; | |
$date_obj = new DateTime($utc_time, new DateTimeZone("UTC")); | |
$date_obj->setTimeZone("America/Los_Angeles"); | |
$display_date = $date_obj->format("Y-m-d H:i:s"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment