Jiff vs Chrono: Which Rust Datetime Library Wins
Jiff vs chrono for Rust datetime handling: DST edge cases, API ergonomics, and when each library wins, from someone who's been burned by both camps.

Every few years, some poor engineer discovers that 2026-11-01 01:30 in New York happens twice, and that their scheduler just fired the billing job an hour early. Datetime bugs don't crash your program — they quietly corrupt your data. That's why the arrival of Jiff 1.0, a new Rust datetime library from Andrew Gallant (of ripgrep fame), matters beyond yet another crate release. It forces a real question: Jiff vs chrono — which one should your next Rust project use?
A Short History of Rust Datetime Pain
Rust has been here before, and the history is instructive. Chrono dates back to the pre-1.0 era of the language, when it was split out of the standard library alongside time as part of the great 'right-size std' cleanup. For nearly a decade it was the default answer. It worked, mostly. But its API accreted layers: NaiveDateTime, DateTime<Utc>, DateTime<Local>, DateTime<FixedOffset>, a TimeZone trait that most people only ever touch through two implementations. The type system let you do plenty of things that made no semantic sense, like adding a naive datetime to a zoned one and getting a confident, wrong answer.
The maintenance story matters too. Chrono went through a period of effective abandonment, and even its later maintainers have described the experience as pushing against API stability that users treated as sacred. One former maintainer put it bluntly: every small step toward improvement met resistance, because chrono's main selling point had become its stability, not its design. That's a trap any long-lived library can fall into — the installed base becomes the product. The time crate tried a different tack with a cleaner core, but punted on full time zone handling for years. Meanwhile, the ecosystem kept shipping applications where 'what time is it in Berlin next March' is a load-bearing question.
This is the old idea Jiff draws on, whether it names it or not: the 'pit of success' philosophy that Rico Mariani described for API design back in the mid-2000s. Make the easy path the correct path. Gallant's framing is that datetime difficulty comes from poor domain modeling, and that libraries which push ambiguity onto users — 'here's a naive datetime, good luck' — are outsourcing their hardest problem. It's the same instinct behind Rust's ownership model: the machine should absorb the complexity so the human doesn't have to.
How Jiff Models Time: The Onion
Jiff's central design move is what Gallant calls the datetime onion. The layers, from the inside out:
civil::Date— a Gregorian date, no location attached. Your birthday is one of these.civil::Time— a wall-clock time to nanosecond precision, no location.civil::DateTime— date plus time, still location-free. This is what chrono calls naive.Timestamp— an unambiguous instant, nanoseconds since the Unix epoch.TimeZone— the rules mapping between instants and civil time in a region.ZonedDateTime— all of it together: instant, civil time, and zone.
The payoff is that the type names match the mental model you already have. A Timestamp is what you get from a database or a system call. A civil::DateTime is what a human writes on a calendar invite. Converting between them is impossible without a time zone, and Jiff makes that conversion an explicit, fallible, zone-annotated operation. Compare chrono, where the equivalent distinction exists but is easier to blur — NaiveDateTime::and_utc() will happily assert a zone onto a wall-clock time without asking whether that wall-clock time ever existed.
The ergonomics are deliberately gentle. You can build a zoned datetime from either direction — civil time plus zone, or timestamp plus zone — and the API meets you there:
use jiff::civil;
fn main() -> anyhow::Result<()> {
// Start from what a human would write on a calendar.
let dt = civil::date(2026, 11, 1).at(17, 30, 0, 0);
let zdt = dt.in_tz("America/New_York")?;
assert_eq!(zdt.offset().seconds(), -(5 * 60 * 60));
// Arithmetic on the civil parts stays civil:
let tomorrow = zdt.date().tomorrow()?;
assert_eq!(tomorrow, civil::date(2026, 11, 2));
Ok(())
}
Daylight Saving Time: Where Jiff Earns Its Keep
Here's the scenario that separates the adults from the children in datetime library design. On November 1, 2026, clocks in New York fall back at 2 AM. The 1 AM hour happens twice. So when a user types '1:30 AM on November 1st,' what do you do? Chrono's answer, historically, has been LocalResult: an enum that might be Single, Ambiguous, or None, and which a startling amount of production code unwraps, discards, or pattern-matches incorrectly. The ambiguity is exposed — but so is the burden of handling it, every single time.
Jiff's answer is to pick a sensible default and make the alternatives one method call away. The default 'compatible' strategy resolves a fold to the earlier occurrence — matching what most calendar software and every major operating system does. But if you care, the full decision tree is right there:
use jiff::{civil::date, tz::TimeZone};
fn main() -> anyhow::Result<()> {
let tz = TimeZone::get("America/New_York")?;
let dt = date(2026, 11, 1).at(1, 30, 0, 0);
let amb = tz.to_ambiguous_zoned_datetime(dt);
let earlier = amb.earlier()?; // offset -04 (EDT), first 1:30
let later = amb.later()?; // offset -05 (EST), second 1:30
// Or refuse to guess entirely:
assert!(tz.to_ambiguous_zoned_datetime(dt).unambiguous().is_err());
Ok(())
}
Gaps get the same treatment: when clocks spring forward and 2:30 AM never happens, Jiff nudges forward by default, and again you can override. The design judgment here is opinionated and, I think, correct. Most code that handles ambiguous times doesn't have a policy — it has a bug waiting for November. Defaulting to the behavior users already expect from their phones, while keeping the escape hatches visible and typed, is exactly what 'pit of success' means in practice. It's a similar philosophy to the one behind good defaults in hand-rolled date arithmetic: the rules are learnable, but you shouldn't have to re-derive them at every call site.

Spans, Durations, and the 'One Month' Problem
Ask chrono for a duration of 'one month' and you'll be disappointed — its Duration is a fixed count of seconds, because a month isn't a fixed count of anything. That's a defensible design, but it means calendar arithmetic ('add three months to January 31st') becomes your problem. Jiff's Span type takes the other path: it holds mixed units from years down to nanoseconds, and the arithmetic resolves in calendar-aware ways. Adding one month to January 31 gives February 28 (or 29), not March 3. Adding one day to a zoned datetime the night before a DST transition adds a calendar day, which may be 23 or 25 hours — which is what a human means when they say 'same time tomorrow.'
This distinction — elapsed time versus calendar time — is the single most confused concept in datetime programming, and it's confused everywhere. Java's original java.util.Date conflated them; Java 8's java.time package (itself modeled on Joda-Time) separated Duration from Period and was the better for it. JavaScript's Temporal proposal makes the same split. Jiff sits comfortably in that lineage: the good ideas in datetime design have been converging for twenty years, and Jiff is essentially the Rust expression of that consensus, much like long-gestating Rust language features eventually arrive as the distilled version of a decade's worth of debate.
There's also a 'friendly' duration format — strings like 2h 30m or P1DT2H parse and print naturally — plus strptime/strftime-style formatting and optional ICU4X integration for locale-sensitive output. These sound like table stakes, but anyone who has written a bespoke chrono format string for a log pipeline knows how much friction they remove.
Jiff vs Chrono: When Each One Wins
Enough tour. Here's the honest comparison, with a point of view attached.
Where chrono still wins
Inertia is a feature. Chrono is in the dependency tree of an enormous share of the Rust ecosystem, appears in countless public APIs, and is maintained by a reliable hand. If your codebase already speaks chrono fluently, your timestamps are UTC-only instants (think metrics pipelines, log envelopes, internal RPC), and your team knows its sharp edges, migration buys you little. Chrono's std-optional, no_std-friendly posture also still matters in embedded corners. And if you're doing something exotic — orbital mechanics at megayear scales, alternate time scales like TAI or UT1 — neither library is really your answer; you'll wrap one of them for string parsing and keep your own representation, and chrono's simplicity at the edges is fine for that.
There's also a legitimate counterpoint I've seen from practitioners: some folks genuinely prefer chrono's explicitness. LocalResult::Ambiguous forces you to think. If your domain is one where guessing wrong about a DST fold has legal or financial consequences — payroll, energy settlement, trading — maybe you want the library to refuse to guess, always. Jiff supports that via unambiguous(), but chrono makes it the path of least resistance. Fair enough.
Where Jiff wins
Almost everywhere else. Any application that touches civil time — scheduling, calendars, user-facing dates, anything crossing time zones — gets a strictly better deal from Jiff. The type names teach the domain. DST ambiguity gets a sane default with typed escape hatches instead of an enum you'll handle wrong at 2 AM. Span does calendar arithmetic correctly out of the box. Parsing and formatting cover the friendly formats humans actually write. And the 1.0 commitment matters: Gallant has stated the intent to hold the API stable indefinitely precisely so Jiff can appear in other libraries' public APIs — the exact property that made chrono's mistakes permanent. The adoption list already backs that ambition: uv, Cargo, Starship, fd, Nushell, Jujutsu, and uutils all use it, and AWS's LLRT built its Temporal implementation on top.
The performance question, since someone always asks: both libraries are fast enough that datetime handling is never your bottleneck. Jiff bundles a compacted copy of the IANA tz database (with a documented, thoughtful stance on using rearguard tzdata) or can use the system zone database. This is a domain where correctness beats microbenchmarks by such a wide margin that choosing on speed would be malpractice. A wrong answer in 50 nanoseconds is still wrong.
A datetime library that makes you handle ambiguity everywhere isn't more honest — it just outsources its hardest problem to the person least equipped to solve it: you, at a call site, in a hurry.
The Bigger Lesson for API Design
Strip the dates away and Jiff is a case study in a broader argument: libraries should encapsulate domain complexity rather than faithfully re-export it. The IANA time zone database is, as critics fairly note, a programmer-oriented artifact — location-based, historically exhaustive, full of identifiers no user would ever type. A lazy library exposes that raw and calls it flexibility. A good one absorbs it: default disambiguation strategies, friendly parsing, type names that map to human concepts. You see the same tension in other domains — the gap between a spec and a usable implementation is where most bugs live, and datetime handling is that gap's natural habitat.
It's also a story about ecosystem patience. Rust waited a decade for its 'definitive' datetime library, the same way it waited years for async to settle or for the never type to stabilize. The wait is the cost of getting the model right instead of locking in the first working draft. Chrono wasn't a failure — it was the draft the ecosystem needed at the time. But drafts get revised.
The Recommendation
New Rust project? Use Jiff. Don't overthink it. The API is better, the DST handling is safer by default, the 1.0 stability commitment is explicit, and the ecosystem momentum — Cargo and uv don't adopt crates casually — means you'll increasingly encounter it anyway. Use ZonedDateTime for anything user-facing, Timestamp for storage and wire formats, and civil types when location genuinely doesn't apply.
Existing chrono codebase that works? Stay put, unless you're touching civil-time-heavy features where chrono's footguns are actively costing you. The two libraries interoperate fine through timestamps and ISO strings, so partial adoption — Jiff for the scheduling module, chrono everywhere else — is a legitimate strategy rather than a compromise.
The deeper takeaway, whatever you choose: datetime handling is hard because the domain is irreducibly weird — leap seconds, folds, gaps, months of variable length, political zones that change by decree. The best a library can do is pick the right defaults, name things honestly, and keep the escape hatches close. Jiff does all three. Twenty years of datetime library evolution, from Joda-Time through java.time to Temporal, converged on the same model for a reason. It's nice to see Rust finally get its version.


