Created
February 27, 2016 18:31
-
-
Save maximishchenko/e1e68846afd9913237b3 to your computer and use it in GitHub Desktop.
Yii2 Setting Time Zone
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 | |
| $formatter = new \yii\i18n\Formatter; | |
| $formatter->dateFormat = 'php:Y-m-d'; | |
| $formatter->timeZone = 'UTC'; | |
| echo $formatter->asDate('NOW'); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment