时间:2021-07-01 10:21:17 帮助过:26人阅读
<?php$timeZones = DateTimeZone::listIdentifiers(); // $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'CN'); // $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::AFRICA | DateTimeZone::AMERICA);echo "<pre>"; print_r($timeZones);echo "</pre>";exit;foreach ($timeZones as $key => $zoneName) { $tz = new DateTimeZone($zoneName); $loc = $tz->getLocation(); print($zoneName . " = " . $loc['comments'] . "<br>"); }
相关推荐:
php支持的时区实例分享
以上就是php支持的时区分享的详细内容,更多请关注Gxl网其它相关文章!