fix test for non utc systems.

`strict_rfc3339.rfc3339_to_timestamp()` is tz aware
`datetime.datetime.fromtimestamp` is not

this causes  the test `test_string_format_datetime` to fail on
system that are not on utc
This commit is contained in:
Berend Kapelle 2019-01-28 14:36:48 +01:00
parent db5d825395
commit f08257b853
No known key found for this signature in database
GPG key ID: C291B44253584293

View file

@ -23,4 +23,4 @@ def format_date(value):
def format_datetime(value):
timestamp = strict_rfc3339.rfc3339_to_timestamp(value)
return datetime.datetime.fromtimestamp(timestamp)
return datetime.datetime.utcfromtimestamp(timestamp)