我有国家代码和地区代码->如何将这两个数据转换为时区名称?
示例
<?php echo geoip_time_zone_by_country_and_region('CA', 'QC'); //returns America/Montreal ?>
我尝试安装
geoip_time_zone_by_country_and_region
但似乎已过时(maxmind的旧版本...)
2019/2020年是否有类似的解决方案?
谢谢
请确保安装PECL扩展名GeoIP。
请参阅https://www.php.net/manual/en/geoip.installation.php。