File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ it into a `cosa build`, as if one did `cosa build ostree`. One can then e.g.
77'''
88
99import argparse
10- import datetime
10+ from dateutil import ( parser , tz )
1111import json
1212import os
1313import subprocess
@@ -229,13 +229,8 @@ def skopeo_inspect(image):
229229
230230
231231def parse_timestamp (timestamp ):
232- # datetime's doesn't support nanoseconds.
233- # So trim it.
234- if len (timestamp ) > 26 and timestamp [19 ] == '.' :
235- timestamp = timestamp [:26 ] + "Z"
236-
237- timestamp = datetime .datetime .strptime (timestamp , '%Y-%m-%dT%H:%M:%S.%fZ' )
238- return rfc3339_time (timestamp .replace (tzinfo = datetime .timezone .utc ))
232+ timestamp = parser .parse (timestamp )
233+ return rfc3339_time (timestamp .astimezone (tz .UTC ))
239234
240235
241236if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments