<?php$timeZones = DateTimeZone::listIdentifiers(); // $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'CN'); // $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::AFRICA | DateTimeZone::AMERICA);echo "<pre class="brush:php;toolbar:false">"; print_r($timeZones);echo "";exit;foreach ($timeZones as $key => $zoneName) { $tz = new DateTimeZone($zoneName); $loc = $tz->getLocation(); print($zoneName . " = " . $loc['comments'] . "
相关推荐:
以上是php支持的时区分享的详细内容。更多信息请关注PHP中文网其他相关文章!