python - pytz - 时区偏移量与公开信息不一致
问题描述
在解决一个单独的问题时,我发现在 pytz 时区“亚洲/雅加达”的 UTC 偏移量为 7h 7m
为什么是这样?根据我能找到的一切,亚洲/雅加达的偏移量应该只有 7h
import pytz
x = pytz.timezone('Asia/Jakarta')
x._utcoffset
# datetime.timedelta(0, 25620)
25620s = 427 分钟或 7 小时 7 分钟
我错过了什么吗?
解决方案
所以我刚刚看到这个链接
http://pytz.sourceforge.net/#issues-limitations
这导致我访问
http://www.iana.org/time-zones。
下载数据并检查我在亚洲文件中找到了这个信息
> # From Paul Eggert (2014-09-06):
> # The 1876 Report of the Secretary of the [US] Navy, p 306 says that Batavia
> # civil time was 7:07:12.5; round to even for Jakarta.
那好吧.....
推荐阅读
- python - Fastapi 的 ASGI 应用程序中的异常 - 错误
- sql-server - 在远程服务器中运行 SQL Server 查询
- java - 如何在没有其他人安装sql的情况下使用MySQL发送java项目
- javascript - 如何为使用 Axios 查询外部 API 并将 JSON 响应保存在多个 Firestore 文档中的 Firebase 函数编写正确的承诺
- r - 在 r 中添加来自另一个文件的列时由错误创建的列
- python - 如何使用“可变缩放”调整图像大小?
- python - html-requests,如果渲染 HTML 时出现 TimeoutError 则跳过
- java - 我正在尝试添加每个 JTextFrame 并且我一直在循环?
- java - Java networkaddress.cache.ttl 和 networkaddress.cache.negative.ttl 缓存刷新率
- flutter - 如何在颤动中向页面添加底部导航项