Skip to content

Commit f08257b

Browse files
committed
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
1 parent db5d825 commit f08257b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_core/schema/schemas/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ def format_date(value):
2323

2424
def format_datetime(value):
2525
timestamp = strict_rfc3339.rfc3339_to_timestamp(value)
26-
return datetime.datetime.fromtimestamp(timestamp)
26+
return datetime.datetime.utcfromtimestamp(timestamp)

0 commit comments

Comments
 (0)