Installed files have wrong dates (Oct 26 1985)

What I Wanted to Do

I checked the dates of the files installed with npm install, and expected them to be either the last modified dates, or at least the date when the package was installed.

What Happened Instead

The files are from Oct 26 1985.

Reproduction Steps

On a POSIX system, in the folder of an existing package, run

$ npm pack
$ tar tvf *.tgz

The dates of the files in the archive are from the beginning of time:

$ tar tvf xpack-es6-promisifier-1.0.0.tgz 
-rw-r--r--  0 0      0        1070 Oct 26  1985 package/LICENSE
-rw-r--r--  0 0      0        2551 Oct 26  1985 package/index.js
-rw-r--r--  0 0      0        6289 Oct 26  1985 package/lib/promisifier.js
-rw-r--r--  0 0      0        8516 Oct 26  1985 package/test/tap/promisify.js
-rw-r--r--  0 0      0        1310 Oct 26  1985 package/package.json
-rw-r--r--  0 0      0         591 Oct 26  1985 package/CHANGELOG.md
-rw-r--r--  0 0      0        8476 Oct 26  1985 package/README.md
-rw-r--r--  0 0      0        1741 Oct 26  1985 package/test/README.md

Publishing and installing the package results in the same old dates.

Details

It looks like the archiver fails to store the correct dates in the archive.

Platform Info

$ npm --versions
{ npm: '6.11.2',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  modules: '64',
  napi: '4',
  nghttp2: '1.39.2',
  node: '10.16.3',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.28.0',
  v8: '6.8.275.32-node.54',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

I had not noticed this, but it is as intended according to this post: tarball content timestamps locked to 1985

Ah, thank you @shadowspawn, so this is a feature, not a bug.

I guess it would be helpful to document it, for example in the npm install page.