Last 12 weeks · 44 commits
3 of 6 standards met
The idea here is that we can use Serde methods like to switch to a more compact serialization format for Jiff's Serde implementations of its various datetime types. I think the main thing to consider here, and to be thoughtful about, is the specific format chosen. Once it lands, we can basically _never_ change it. The existing Serde implementations all use formats described by standards or RFCs (ISO 8601, RFC 3339, RFC 9557). But in #307, I'd describe the choice as "good sense." We should linger on whether it's appropriate to commit to indefinitely. So with that said, I think there are two bits of research to do here: 1. What does the usage of look like in the Rust ecosystem? Are people actually using it and are people happy with it? Are there downsides to querying it in and trait implementations that we should consider here? If this ends up not being a viable path, then I think the main alternative here is to add helpers to for opting specifically into a binary serialization format. 2. We should look at what other datetime libraries (not just those in the Rust ecosystem) do for binary serialization. Perhaps there are things we can learn from them before committing to a specific format here. Note that #307 provides an implementation here, but since it's a definitively breaking change in runtime behavior, it can't land until either or . At present, I don't _plan_ to do a , which means it would need to land in . That in turn means we need to have very high confidence in the change, since I plan to commit to indefinitely.
Fixes #645. checked that the seconds fit in an , then passed them to . But 's valid range is much narrower than , so input just past or tripped a and panicked. In release builds it quietly returned an invalid timestamp instead (e.g. gave a timestamp at 253402207201s). This switches to , which checks the real range. The new test covers /, one past each, and the extremes. jiff-core tests and jiff's timestamp tests pass. I used Claude Code to find the cause and write the fix and test. I've reviewed the change and can answer questions about it.
Repository: BurntSushi/jiff. Description: A datetime library for Rust that encourages you to jump into the pit of success. Stars: 2936, Forks: 124. Primary language: Rust. Languages: Rust (99.5%), Shell (0.4%), Lua (0%). License: Unlicense. Topics: calendar, civil, date, date-time, datetime, duration, iana, iso8601, jiff, local, rfc2822, rust, strftime, strptime, temporal, time, timezone, tzdb, utc, zone. Latest release: 0.2.0 (1y ago). Open PRs: 7, open issues: 42. Last activity: 1w ago. Community health: 57%. Top contributors: BurntSushi, fiadliel, musicinmybrain, LeoniePhiline, 1996fanrui, benjoffe, tisonkun, robertbastian, dickermoshe, jessekrubin and others.