Use UTC times consistently
还没有人认领这个 Issue。
评估
调研方向
先阅读 pins/versions.py 中第 77-78 行附近和第 104 行的内容,然后将其 datetime 处理方式与链接的 pins-r 实现进行比较。检查 Python pins 在哪里写入和解析创建时间戳,并记录由此产生的 UTC 行为;完成时应一致地覆盖相关路径,并处理建议的 Ruff DTZ 规则。
由索引模型根据 Issue 内容生成。
描述
Regarding this comment:
https://github.com/rstudio/pins-python/blob/d215a8cd6cf958be0f4fc41c6e90e21c907b4655/pins/versions.py#L77-L78
As far as I can tell, R pins will write the created datetime as a UTC time:
https://github.com/rstudio/pins-r/blob/de47c3141d97020e9f4a6a2e93d5823bc649105b/R/meta.R#L50
And the functions it uses to parse datetimes also specify UTC (although the two parse_ functions indeed strip it out).
https://github.com/rstudio/pins-r/blob/de47c3141d97020e9f4a6a2e93d5823bc649105b/R/meta.R#L55-L68
I haven't looked into this too deeply though.
As far as I can tell, Python pins will just use the local datetime, e.g.
https://github.com/rstudio/pins-python/blob/d215a8cd6cf958be0f4fc41c6e90e21c907b4655/pins/versions.py#L104
I suggest that this behaviour is changed (this is arguably a breaking change, arguably a bugfix) to use UTC consistently everywhere. To that end, the DTZ rules in ruff could be helpful to enable.
In any case, I think it would be worth documenting this behaviour in more detail.
- 主要语言
- Python
- 星标
- 59
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rstudio/pins-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
rstudio/pins-python#367 ·
-
.maint
难度 2/5 1-3 小时 新手友好度 62/100
rstudio/pins-python#280 ·
-
testing
难度 2/5 1-3 小时 新手友好度 62/100
rstudio/pins-python#196 ·
-
.enhancement
难度 5/5 一周以上 新手友好度 35/100
rstudio/pins-python#363 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
rstudio/pins-python#354 ·
查看 rstudio/pins-python 的全部 Issue
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭available documentation good first issue
难度 1/5 1-3 小时 新手友好度 95/100
Nixitov/Riptide-Native#944 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
JTHCode/secretguard#24 ·
维护者通常 1 天内回复
-
area: middleware documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 ·
维护者通常 1 天内回复