Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support reading extended timestamp information #160

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

thejoshwolfe
Copy link
Owner

@thejoshwolfe thejoshwolfe commented Nov 3, 2024

In an attempt to fix this: thejoshwolfe/yazl#70 , I learned how modern (circa 2008) zip file implementations encode timestamps in a not-terrible way. Let's add support to yauzl, then yazl.

This change will cause timestamps read by yauzl to be slightly more precise. If this throws off any unit tests that expect an exact value, you can either adjust the test or set {forceDosFormat:true} to restore the old behavior. I'm considering this to be a feature addition rather than a breaking change for semver purposes, because I believe the extra precision is generally an improvement and not a breaking change, but please open bug reports if you find a significant regression in the behavior.

This change enables reading timestamps outside the range allowed by DOS, notably the UNIX epoch in 1970 is now possible, provided that the zip file creator used one of the supported extensions.

@thejoshwolfe thejoshwolfe merged commit 421c51f into master Nov 3, 2024
5 checks passed
@thejoshwolfe thejoshwolfe deleted the extended-timestamp branch November 3, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant