Use jiff for ZIP timestamps#36
Merged
Merged
Conversation
woodruffw
reviewed
May 12, 2026
| zstd = ["async-compression/zstd"] | ||
| xz = ["async-compression/xz"] | ||
| deflate64 = ["async-compression/deflate64"] | ||
| jiff-02 = ["dep:jiff"] |
Member
There was a problem hiding this comment.
Nit (not a blocker): slightly inconsistent with the other feature names, although I personally like this name-version pattern 🙂
woodruffw
approved these changes
May 12, 2026
jiff for ZIP timestamps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the optional
chronotimestamp support with an optionaljifffeature, matching the synczipcrate's Jiff-facing API direction.When
jiffis enabled, newZipEntryvalues now default their last-modified timestamp to the current UTC time via Jiff. When it is disabled, writes keep using the deterministic MS-DOS epoch timestamp of1980-01-01 00:00:00.This keeps
ZipDateTime::default()deterministic while addingZipDateTime::default_for_write()for feature-sensitive write defaults.Changes
chronofeature/dependency with optionaljiff.ZipDateTime::{as_jiff, from_jiff}and Jiff conversion impls behindjiff.ZipDateTime::default_for_write()when constructing new entries.zipdependency from enabling its default timestamp/compression feature set.Validation
cargo fmt --all --checkcargo test --lib default_cargo test --lib --features jiff default_cargo test --libcargo test --lib --all-featurescargo check --no-default-features --features full-wasm --libcargo clippy --lib -- -D warningscargo clippy --lib --all-features -- -D warnings