$ tar xf tomli-2.0.1.tar.gz
$ ls -al --full-time tomli-2.0.1/src/tomli/__init__.py
-rw-r--r-- 1 konsti konsti 396 2022-02-08 11:53:43.280333500 +0100 tomli-2.0.1/src/tomli/__init__.py
This creates a problem because the timstamps are by default inferred to unix time 1 (~1970), while python std's zipfile library does not support timestamps before 1980.
For certain tar file, the
tar
command on ubuntu 23.10 andtarfile
in the python 3.11 standard library read the correct mtime, while tar-rs claims it's 0. Example: https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gztar-rs prints
0
:python prints
1644317623.2803335
:tar
sets the same timestamp:This creates a problem because the timstamps are by default inferred to unix time 1 (~1970), while python std's
zipfile
library does not support timestamps before 1980.