We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ec5990 commit ff89ae0Copy full SHA for ff89ae0
src/cmd-import
@@ -231,10 +231,11 @@ def skopeo_inspect(image):
231
def 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"
+ # ignore the microseconds too, as not all images has it.
+ if len(timestamp) > 19:
236
+ timestamp = timestamp[:19] + "Z"
237
- timestamp = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S.%fZ')
238
+ timestamp = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%SZ')
239
return rfc3339_time(timestamp.replace(tzinfo=datetime.timezone.utc))
240
241
0 commit comments