简体   繁体   English

如何通过城市名称查找UTC日期/时间?

[英]How to find UTC date/time by city name?

如何通过城市名称查找UTC日期/时间?

Maybe you want this?: 也许您想要这个?:

$d = new DateTime("now", new DateTimeZone("Europe/Minsk"));
echo $d->format(DateTime::W3C);

You can try to take a look into GeoIP extension. 您可以尝试查看GeoIP扩展。 It has "geoip_time_zone_by_country_and_region" function. 它具有“ geoip_time_zone_by_country_and_region”功能。 Maybe it could help you. 也许可以帮到您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM