1
0
mirror of synced 2024-11-24 18:24:23 +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 assert isinstance(member, tarfile.TarInfo) # please mypy
metadata = {} metadata = {}
if member.mtime != 0: if member.mtime != 0:
metadata['mtime'] = str(member.mtime) metadata['mtime'] = datetime.datetime.fromtimestamp(member.mtime)
if member.uid != 0: if member.uid != 0:
metadata['uid'] = str(member.uid) metadata['uid'] = str(member.uid)
if member.gid != 0: if member.gid != 0: