Last active
November 24, 2017 09:02
-
-
Save dostrog/a4172c53f1e8593eef45af34c8f87cb1 to your computer and use it in GitHub Desktop.
Get timestamp in local TimeZone (PHP)
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
$dateWithTZ = new DateTime(null, new DateTimeZone('Europe/Moscow')); | |
$dateTimeNow = $dateWithTZ->getTimestamp() + $dateWithTZ->getOffset(); | |
echo 'Default timezone E/M: '.$dateTimeNow."\r\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment