Monday, 16 November 2026
Rīga TV

World and Latvian news in one place

TechnologyPublished: 16 November 2026 at 23:03

Jiff 1.0 Released: A Datetime Library for Rust Programmers

Developer BurntSushi has released Jiff 1.0, a datetime library for the Rust programming language that puts time zone handling at the center of its API. Several well-known projects already use it, and the author plans to keep the 1.0 API stable indefinitely.

Jiff, a datetime library for the Rust programming language, has reached version 1.0. The library's author, a developer who goes by BurntSushi, announced the release on his blog together with a tour of the API. The library is aimed at Rust programmers who need convenient date and time handling. Its design puts time zones front and center, so that many common problems linked to daylight saving time are handled automatically.

Adoption and compatibility pledge

According to the author, Jiff is already used in production in many projects, including uv, Cargo, Starship, fd, Nushell, mise, Jujutsu and uutils/coreutils. It also serves as the basis for a Temporal implementation in AWS LLRT. For that reason he considers it time to call the library 1.0.

Unless a significant defect turns up in the API, he plans to commit to 1.0 indefinitely. The goal is for Jiff to be an ecosystem building block that appears in the public API of other libraries. Releases that break semantic-versioning compatibility would therefore cause significant pain, and they will not be made lightly. Changes between versions 0.2 and 1.0 are listed in the CHANGELOG.

How the library models time

The author argues that datetime handling has historically been hard because of poor modeling of the domain, with many libraries passing complexity on to their users. Jiff instead tries to encapsulate that complexity and make mistakes difficult.

He compares the library's types to an onion. The inner layers are civil::Date, a Gregorian calendar date; civil::Time, a clock time with nanosecond precision; and civil::DateTime, which combines the two without attaching them to a location. A Timestamp represents a specific instant as nanoseconds since the Unix epoch, while a TimeZone is a set of rules that maps an instant to a civil datetime and back. The outer layer, ZonedDateTime, combines all of these.

Ambiguity around clock changes

The post also shows how Jiff handles clock transitions. When clocks are set back and an hour repeats, Jiff picks the first occurrence by default. Users can change this by selecting the later time or by requiring an error whenever there is ambiguity.

Comments

0/1500

Comments are automatically moderated. No hate, threats, personal data or spam.

Loading comments…

More in this category