Last active
August 13, 2019 13:31
-
-
Save jrodriguez-ifuelinteractive/2c5ef16d1dbb7c0120844b24cf2f51cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
$date = new DateTime('2019-01-21 00:00:00', new DateTimeZone('America/New_York')); | |
$date->setTimeZone(new DateTimeZone('UTC')); // New timezone | |
echo $date->format('Y-m-d H:i:s e'); //2019-01-21 05:00:00 UTC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment