有没有一种简单的方法可以从
例如:
在这种情况下,Locale应该是
timezone_identifier
中获取区域设置?例如:
date_default_timezone_set('Europe/Berlin');
在这种情况下,Locale应该是
de_DE
。deceze
所说,这是不可能的。但您可以从时区获取位置信息。根据php.net上的说明。$tz = new DateTimeZone("Europe/Prague");
print_r($tz->getLocation());
print_r(timezone_location_get($tz));
将输出
Array
(
[country_code] => CZ
[latitude] => 50.08333
[longitude] => 14.43333
[comments] =>
)
Array
(
[country_code] => CZ
[latitude] => 50.08333
[longitude] => 14.43333
[comments] =>
)