Last active
January 30, 2019 12:58
-
-
Save kylekatarnls/380246be4d99a86cfcddecc0097966c5 to your computer and use it in GitHub Desktop.
Revisions
-
kylekatarnls revised this gist
Jan 30, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ <?php $dateString = rtrim($_POST['date'], 'Z'); $date = new DateTimeImmutable("$dateString Asia/Tokyo"); echo $date->setTimezone(new DateTimeZone('UTC'))->format('Y-m-d H:i:s.u'); -
kylekatarnls created this gist
Jan 30, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ <?php $date = new DateTimeImmutable('2018-01-25T23:00:00 Asia/Tokyo'); echo $date->setTimezone(new DateTimeZone('UTC'))->format('Y-m-d H:i:s.u');