Closed duttonkj closed 4 years ago
Oh dear. I couldn't find proper documentation on the DOS date/time format used by ZIP (especially the byte order which I may have gotten completely wrong). I'll look into it more.
Just in case, have you checked the date on your original resources (Last-Modified header for Responses, or lastModified property on Files) ?
Yes, we are using Cloudfront to serve images and it provides a Last-Modified
header.
OK, I had indeed reversed the date and time and their endianness. It appears also that I was misled into the common misconception that a DOS datetime should be based on UTC (I see that JSZip and some Node.js libs do it). … It's not. It's "local time". So… I guess I'll just use the client's timezone, that way when they unzip the archive to their more modern filesystem, their zip program will resolve the time based on the same timezone and it'll cancel out. Tested on my macOS.
It means that different clients (living in different timezones) will get different dates in their ZIP files. Cool, huh ?
Thanks for the quick fix. That works for our use case
You're welcome. Thank you for using client-zip and getting me to finally dive into this issue and get it right (I think — I really hope that using the client's timezone will work for everyone).
Thank you!
Thanks for the great package! It's lightning fast and super reliable.
We have installed in our app and during QC and noticed the following issue.
Date Modified
is showing some wild dates:I have attempted to set the
lastModified
property withnew Date()
but it still has issues: