You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I reside in UTC+03. When I use the update.py script:
>>> import time
>>> from email.utils import parsedate
>>> lastmod = "Thu, 28 May 2020 16:40:36 GMT"
>>> parsedate(lastmod)
(2020, 5, 28, 16, 40, 36, 0, 1, -1) # <-- ok
>>> time.mktime(parsedate(lastmod))
1590673236.0 # <-- not ok! 3 hours offset (caused by my TZ)
# 1590673236 is "Thursday, May 28, 2020 1:40:36 PM GMT" (notice the 3 hours difference, caused by my TZ)
# should be 1590684036
I reside in UTC+03. When I use the
update.py
script:A resolution for this is to replace
time.mktime()
withcalendar.timegm()
.Reference: https://docs.python.org/3/library/time.html#index-4
The text was updated successfully, but these errors were encountered: