Skip to main content
osky
Sección
Technology

On November 15, 2026, Andrew Gallant published Jiff 1.0, his datetime library for Rust. The important part is the promise: barring a serious defect in the API, Jiff stays on the 1.x series indefinitely. For an ecosystem that has spent years choosing between chrono and time with a doubtful look on its face, that's good news.

What was announced

According to the announcement, Jiff was already running in production before 1.0 in projects like uv, Cargo, Starship, fd, Nushell, mise, Jujutsu and uutils/coreutils, and it's the foundation of a Temporal implementation in AWS LLRT. Gallant wants Jiff to show up in the public API of other libraries, and there a new major version forces half the world to upgrade at the same time. That's why he says breaking releases "will not be made lightly."

Adoption isn't theoretical. As of November 21, crates.io counts about 297 million downloads in total and around 129 million in the last 90 days. Two days after the announcement, 1.0.1 was already out, fixing two bugs: the %Z format in Timestamp::strftime and a timestamp parsing issue that could produce an out-of-range value.

The idea: make getting it wrong take effort

Gallant's diagnosis is that dates are hard because of poor domain modeling: many libraries pass the complexity on to the user. Jiff tries to encapsulate it. At the center is ZonedDateTime, which brings together an exact instant, the civil time and a time zone from the IANA database. That way, tomorrow() knows a day can last 25 hours when the clocks change.

Diagrama de la cebolla de tipos de Jiff: civil::Date y civil::Time forman un civil::DateTime; con una TimeZone, ese DateTime o un Timestamp se convierten en un ZonedDateTime

What else it brings, according to the announcement:

  • Two kinds of durations. Span mixes calendar and clock units and keeps each unit (two hours is not the same as 120 minutes in memory, even though they last the same). SignedDuration is a signed version of std::time::Duration.
  • Standard formats. RFC 3339 for timestamps, RFC 9557 for zoned datetimes (2026-11-12T15:36:00-05:00[America/New_York]) and ISO 8601 for durations, plus strptime and strftime.
  • A "friendly" duration format, like 3d 4h 59m or 1 week, that can be read back without losing information.
  • Locales and other calendars outside the core: Jiff only uses the Gregorian calendar, and to format according to language or convert from other calendars it integrates with ICU4X through the jiff-icu crate.

The declared inspiration is Temporal, JavaScript's standard date API. Jiff doesn't aim to be 100% compatible: for example, its range only goes up to ±9999 years.

Daylight saving time without guessing

The most useful part of the announcement is how it handles times that don't exist or that repeat. When the clock springs forward there's a gap; when it falls back, an hour happens twice (a fold). Jiff resolves these by default with the "compatible" strategy, but lets you choose earlier(), later() or unambiguous(), which returns an error instead of picking for you.

Diagrama con dos líneas de tiempo de Nueva York en 2026: el 8 de marzo la 02:30 no existe y el 1 de noviembre la 01:30 ocurre dos veces, con la estrategia que elige Jiff en cada caso

What breaks if you're coming from 0.2

The CHANGELOG says the big change is "big but simple": Zoned is now called ZonedDateTime, and methods like Timestamp::to_zoned become Timestamp::to_zoned_datetime. The rest, according to Gallant, shouldn't affect most people:

Change What you'll notice
Zoned → ZonedDateTime Rename types and to_zoned methods
Subtracting two Timestamps Now returns SignedDuration
Timestamp → SystemTime The conversion can now fail
Offset::saturating_add Can now fail
ToSpan Now sealed: you can't implement it on your own types
MSRV Goes up to Rust 1.85

I didn't try it in a project of my own: this comes from the official changelog.

When you don't need it

The announcement itself says it: to measure how long something takes, use std::time::Instant, and if you live only in UTC with Unix timestamps, std::time::SystemTime is enough. Jiff is worth it when humans are involved: time zones, formats and "the same day next month."

My take

On his blog, Gallant says that in 2024 he never knew whether to use chrono or time, and that he concluded both had reached a "local maximum." With 1.0 and the list of projects already using it, Jiff stops being "the third option" and becomes the default answer for new projects that show dates to people. If you have a backend, a bot or a booking system in Rust that schedules things in the user's local time, the stability promise is exactly what you needed to put it in your public API without fear of a migration in six months.

Sources