Skip to content
Snippets Groups Projects
Commit 1c0789dc authored by Henrik Thostrup Jensen's avatar Henrik Thostrup Jensen
Browse files

fix parsing of cli timestamp (fix from Carlos de Souza Lima Junior)

parent 2aa72b99
Branches
Tags
No related merge requests found
...@@ -57,7 +57,7 @@ def parseTimestamp(value): ...@@ -57,7 +57,7 @@ def parseTimestamp(value):
offset = int(value[1:]) offset = int(value[1:])
ts = datetime.datetime.fromtimestamp(time.time() + offset, tzutc()).replace(tzinfo=None) ts = datetime.datetime.fromtimestamp(time.time() + offset, tzutc()).replace(tzinfo=None)
else: else:
ts = datetime.datetime.strptime(value, XSD_DATETIME_FORMAT).astimezone(tzutc()).replace(tzinfo=None) ts = datetime.datetime.strptime(value, XSD_DATETIME_FORMAT).replace(tzinfo=None)
assert ts.tzinfo is None, 'Timestamp must NOT have time zone' assert ts.tzinfo is None, 'Timestamp must NOT have time zone'
return ts return ts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment