dateutil
dateutil copied to clipboard
incorrectly parsing timezone in ISO format timezone: UTC+8:00 UTC-8:00
dig into the object, found the timezone parsed is incorrectly identified for UTC+HH:MM
UTC+8:00 is identified as timezone UTC-8:00
is it a known issue?
from dateutil import parser
def p(tm):
dt = parser.parse(tm)
dt.timestamp()
print(p('2019-01-14 11:13:09 UTC+8:00')) # 1547493189 should be 1547435589
print(p('2019-01-14 11:13:09 UTC-8:00')) # 1547435589 should be 1547493189
refer to http://timestamp.online/
i found it works for 2019-01-14 11:13:09+8:00, close it. now