使用“arrow”或“dateutil”时如何查找时区数据库版本?

2024-06-06 16:20:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Python的arrow模块进行时区操作。据我所知,它依赖于dateutil模块来获取时区信息。dateutil声明:

Internal up-to-date world timezone information based on Olson's database.

我只找到了c:\Python34\Lib\site-packages\dateutil\zoneinfo\dateutil-zoneinfo.tar.gz似乎在使用。我推断它是从http://www.iana.org/time-zones下载的,但是它仍然没有给出任何关于它是什么版本的数据库的提示。在

有没有办法找出arrow模块正在使用的Olson数据库的哪个版本?在


Tags: 模块to版本信息数据库声明worlddate
1条回答
网友
1楼 · 发布于 2024-06-06 16:20:41

是的,箭头取决于tz数据的dateutil。

不幸的是,dateutil在构建数据文件时没有保留tzdb版本号,因此在运行时不可用。

穿过the dateutil source code

如果此特性对您很重要,我建议在the dateutil issue tracker中打开一个功能请求。

相关问题 更多 >