Skip to content

Conversation

@sirosen
Copy link
Member

@sirosen sirosen commented May 18, 2025

I wasn't able to push a rebase+fix to #565, so this is a follow-up. Resolves #565.


  • Use calendar.timegm instead of time.mktime for UTC timestamps
  • Add a regression test for localtime handling
Radosław Kozicki and others added 3 commits May 17, 2025 15:20
time.mktime() converts a time tuple in local time to seconds since the Epoch, as stated in the docs: > Convert a time tuple in local time to seconds since the Epoch. > Note that mktime(gmtime(0)) will not generally return zero for most > time zones; instead the returned value will either be equal to that > of the timezone or altzone attributes on the time module. calendar.timegm() is guaranteed to produce UTC timestamp: > Unrelated but handy function to calculate Unix timestamp from GMT.
@sirosen sirosen merged commit f98acd4 into main May 18, 2025
45 checks passed
@sirosen sirosen deleted the cache_mtime branch May 18, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants