Improve the display of tarfile's members mtime
This commit is contained in:
parent
8e41b098d6
commit
14a4cddb8b
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user