Created
April 27, 2015 09:22
-
-
Save fetus-hina/8a7b531aefe2c515d139 to your computer and use it in GitHub Desktop.
HHVM date.timezone UTC
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
# タイムゾーンはデフォルト (America/New_York のはず) | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm hoge.php | |
2015-04-27 05:16:51-0400 | |
# Asia/Tokyo を指定してみる | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Asia/Tokyo hoge.php | |
2015-04-27 18:16:59+0900 | |
# Etc/UTC を指定してみる | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Etc/UTC hoge.php | |
2015-04-27 09:17:09+0000 | |
# UTC を指定するとエラーは出ないけど動かない | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=UTC hoge.php | |
2015-04-27 05:17:12-0400 | |
# UTC+0 とかは知らない(これは正常)。知らないのでエラーを吐いてる。なぜかシステムのタイムゾーンが適用。 | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=UTC+0 hoge.php | |
Notice: Timezone ID 'UTC+0' is invalid | |
Notice: Timezone ID 'UTC+0' is invalid | |
2015-04-27 18:17:15+0900 | |
# GMT もエラーにならないけど動かない | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=GMT hoge.php | |
2015-04-27 05:18:20-0400 | |
# Etc/GMT なら動くし | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Etc/GMT hoge.php | |
2015-04-27 09:18:26+0000 | |
# Etc/GMT+0 も動く | |
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Etc/GMT+0 hoge.php | |
2015-04-27 09:18:31+0000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment