Jiff 1.0: A datetime library for Rust
Andrew Gallant has released Jiff 1.0, a Rust datetime library designed for correct time zone handling and robust domain modeling.
read it The release post offers a thorough technical tour of Jiff's domain modeling, time zone ambiguity handling, and design rationale.
summary
Andrew Gallant announces Jiff 1.0, a production-ready datetime library for Rust already adopted by major tools like Cargo and uv. The library centers time zone handling and clear domain modeling to prevent bugs around daylight saving time transitions, folds, and gaps. It introduces robust types for civil time, timestamps, zoned datetimes, and hybrid durations. The release establishes a long-term stability commitment, providing a modern alternative to legacy libraries.
key points
- Jiff models time as layers from plain civil dates up to fully qualified ZonedDateTime objects.
- It explicitly handles daylight saving time transitions, offering strategies for ambiguous folds and missing gaps.
- The library distinguishes between Span for hybrid calendar units and SignedDuration for pure physical time.
who should read it
Rust developers seeking a reliable, modern datetime library for production use.
discussion warm
consensus
Commenters overwhelmingly praise the release, celebrating BurntSushi's engineering work and welcoming Jiff as a much-needed modern alternative to Chrono.
pushback
A few commenters note that Jiff strictly targets the Unix time scale, requiring specialized alternatives like hifitime for astronomical simulations.
I maintained chrono for about half a decade, and the specific reason I took on maintenance was because the API sucked and I hoped I could make it better.
Turns out, the reason people wanted to use it was because the API was stable and every slight step towards improvement was met with... resistance. I stopped maintaining it because the burnout from seeing what it could be and not seeing any path to get there was too much for me.
I'm extremely grateful to burntsushi for writing the datetime library rust deserves. Chrono is stable and is maintained (though semi-deprecated) by an extremely …
A former Chrono maintainer shares candid insight into the burnout of maintaining a legacy datetime library and praises Jiff's design.
Generated by an LLM from the article and thread. Check the sources before relying on it.