Created
September 5, 2012 01:40
-
-
Save lighty/3628979 to your computer and use it in GitHub Desktop.
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
foreach(DateTimeZone::listIdentifiers() as $val){ | |
date_default_timezone_set('UTC'); | |
$utcTime = strtotime('2012-01-01 00:00:00'); | |
date_default_timezone_set($val); | |
$date = date("Y/m/d H:i:s", $utcTime); | |
print $val."\t".$date."\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment