[xmlparser] Fix date extraction when using old format
This commit is contained in:
parent
8bcceb641f
commit
2644d1bc02
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ class ModuleState:
|
|||
except ValueError:
|
||||
while True:
|
||||
try:
|
||||
import time
|
||||
return time.strptime(source[:19], "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)
|
||||
import calendar, time
|
||||
return datetime.utcfromtimestamp(calendar.timegm(time.strptime(source[:19], "%Y-%m-%d %H:%M:%S"))).replace(tzinfo=timezone.utc)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue