Skip to content

Commit fae5092

Browse files
committed
try to fix test failure
1 parent c529547 commit fae5092

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sdks/python/apache_beam/yaml/yaml_mapping.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ def js_to_py(obj):
228228
return [js_to_py(v) for v in obj]
229229
elif isinstance(obj, str):
230230
try:
231+
if obj.endswith('Z'):
232+
return datetime.datetime.fromisoformat(obj[:-1] + '+00:00')
231233
return datetime.datetime.fromisoformat(obj)
232234
except ValueError:
233235
return obj

0 commit comments

Comments
 (0)