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
@@ -233,13 +233,8 @@ def skopeo_inspect(image):
233233
234234
235235def parse_timestamp (timestamp ):
236- # datetime's doesn't support nanoseconds.
237- # So trim it.
238- if len (timestamp ) > 26 and timestamp [19 ] == '.' :
239- timestamp = timestamp [:26 ] + "Z"
240-
241- timestamp = datetime .datetime .strptime (timestamp , '%Y-%m-%dT%H:%M:%S.%fZ' )
242- return rfc3339_time (timestamp .replace (tzinfo = datetime .timezone .utc ))
236+ timestamp = parser .parse (timestamp )
237+ return rfc3339_time (timestamp .astimezone (tz .UTC ))
243238
244239
245240if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments