Last active
April 11, 2018 04:56
-
-
Save Sivamanim/094ac63c24d06f811b94f6b2123498f7 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 | |
$utc = '2018-04-10 12:51:59 UTC'; | |
$dt = new DateTime($utc); | |
$tz = new DateTimeZone('Asia/Kolkata'); // or whatever zone you're after | |
$dt->setTimezone($tz); | |
echo $dt->format('Y-m-d H:i:s'); | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment