-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Regarding this comment:
Lines 77 to 78 in d215a8c
# TODO: the datetime from pins is not timezone aware, but it looks like | |
# R pins parses as UTC, then unsets the UTC part? |
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.
Line 104 in d215a8c
created = datetime.now() |
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.