Created
July 16, 2015 06:30
-
-
Save tadasuke/fadc79d62124d197cd2b to your computer and use it in GitHub Desktop.
DateTimeオブジェクトのコンストラクタにUNIX_TIMEを渡した時の謎挙動 ref: http://qiita.com/tadasuke/items/07d95f5dac3d9dfeae68
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
$dateTime = new DateTime( '@' . time() ); |
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
$dateTime = new DateTime( '@' . time(), , new DateTimeZone( 'Asia/Tokyo' ) ); |
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
$dateTime = new DateTime( '@' . time() ); | |
$dateTime -> setTimezone( new DateTimeZone( 'Asia/Tokyo' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment