1
0
mirror of synced 2024-12-27 15:19:57 +01:00

Improve the display of tarfile's members mtime

This commit is contained in:
jvoisin 2019-04-27 21:15:06 +02:00
parent 8e41b098d6
commit 14a4cddb8b

View File

@ -239,7 +239,7 @@ class TarParser(ArchiveBasedAbstractParser):
assert isinstance(member, tarfile.TarInfo) # please mypy
metadata = {}
if member.mtime != 0:
metadata['mtime'] = str(member.mtime)
metadata['mtime'] = datetime.datetime.fromtimestamp(member.mtime)
if member.uid != 0:
metadata['uid'] = str(member.uid)
if member.gid != 0: