The date in the exported file is incorrect
The timestamp of the downloaded zip file does not match the file time, and the file time is incorrect
This needs a little more information to be resolved, can you provide a reproducible scenario?
I faced this issue today. In the browser (Firefox), I create a zip:
const zip = new JSZip();
const fileContent = await download(fileStatus.fileId); // Uint8Array
zip.file(filename, fileContent);
const buffer = await zip.generateAsync({
compression: "DEFLATE",
compressionOptions: {level: 9},
type: "uint8array",
});
If I save the zip from buffer on my system and then extract it immediately, I get this:
-rw-rw-r-- 1 cleyfaye cleyfaye 40827 May 21 08:26 'content.pdf'
-rw-rw-r-- 1 cleyfaye cleyfaye 607523 May 21 10:26 'generated.zip'
As expected, the zip creation time is correct (it shows 10:26 here); but the extracted file have 08:26. It feels like it's a timezone issue (I'm currently in a UTC+2 timezone).
This behavior happens across multiple systems: using unzip on a debian system or whatever default zip tools exists on OSX.
https://github.com/Stuk/jszip/issues/369