jiff-static
Create static TimeZone values for Jiff (useful in core-only environments).
0.2.35
103M downloads/mo
#800 most downloaded on crates.io
BurntSushi/jiff
What this package is like to depend on
Last release 29 days ago
25 Jul 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 34 of 34 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
34 releases · first in 2025
20 releases in the last 12 months
see the full history below
Release timeline
34 releases · Mar 2025 to Jul 2026Releases
latest 34-
0.2.3525 Jul 2026Release notes
Open source →This release fixes a bug in duration parsing where, e.g.,
-PT0.5Swould be parsed as if the-sign didn't exist. This bug also affects friendly durations such as-0.5s.Bug fixes:
- #613: Fixes a bug where the sign in a duration could be ignored while parsing.
-
0.2.3419 Jul 2026Release notes
Open source →This release contains a few small enhancements. Namely, some error messages for parsing datetime values have been improved by removing some redundant messaging. Additionally, the
strftimeAPIs on datetime values can no longer panic. Instead, they'll silently pass through invalid formatting directives.Enhancements:
-
0.2.3319 Jul 2026Release notes
Open source →This release permits the use of a global time zone database in
alloc-only environments. It also contains a massive internal refactor that introduces a newjiff-corecrate for better code sharing.Enhancements:
-
0.2.3209 Jul 2026Release notes
Open source →This release updates Jiff's bundled copy of the [IANA Time Zone Database] to
2026c. See the2026crelease announcement for more details. -
0.2.3129 Jun 2026Release notes
Open source →This release fixes a minor bug in tests that prevents the crate from running through standard build processes in Linux distributions downstream.
- #594: Fix imports in recently added tests.
-
0.2.3029 Jun 2026Release notes
Open source →This release fixes a safety soundness bug in Jiff's lower level printing APIs. There is also a nice performance improvement to
civil::Date::weekday, which also improves downstread routines likecivil::Date::nth_weekdayand datetime<-->timestamp conversions in some cases.Enhancements:
- #591: Improve the performance of weekday calculations from Gregorian dates by 30-50%.
Bug fixes:
- #592:
Fix safety soundness bug when using a non-empty
Stringdestination buffer with lower level printing APIs inside ofjiff::fmt.
-
0.2.2921 Jun 2026Release notes
Open source →This release adds support for [
defmt], which is a highly efficient logging framework that targets resource-constrained devices, like microcontrollers.Enhancements:
- #505:
Add support for the
defmtcrate by implementingdefmt::Formaton the principle public types in Jiff. - #584:
Add
Zoned::UNIX_EPOCHas a constant. - #587:
Change the
Debugoutput forcivil::ISOWeekDateto match theDebugoutput style of other primitive datetime types.
Bug fixes:
- #505:
Add support for the
-
0.2.2829 May 2026Release notes
Open source →This is a small release with a fix for test failures on 32-bit targets in
no-allocenvironments.Bug fixes:
- #573:
Fix test failure on 32-bit targets in
no-allocenvironments.
- #573:
Fix test failure on 32-bit targets in
-
0.2.2726 May 2026Release notes
Open source →This is a small release with a bug fix for build errors on Windows for very old versions of Rust.
Bug fixes:
- #566: Fix build error on Windows for very old versions of Rust (e.g., 1.71).
-
0.2.2626 May 2026Release notes
Open source →This release has a couple enhancements.
Firstly, Jiff now uses
windows-linkfor calling FFI routines on Windows instead ofwindows-sys. Usingwindows-linkmeans less churn and fewer duplicates in the dependency graph.Secondly, a new
jiff-sqlx 0.2.0release has been put out to supportsqlx 0.9.0.Enhancements:
- #538:
Replace use of
windows-syswithwindows-linkand inline bindings. - #561:
Update
jiff-sqlxto usesqlx 0.9.0and releasejiff-sqlx 0.2.0.
Bug fixes:
- #548:
Absolutetize incorrect relative size terms in the documentation of
RoundMode.
- #538:
Replace use of
-
0.2.2525 May 2026Release notes
Open source →This release updates Jiff's bundled copy of the [IANA Time Zone Database] to
2026b. See the2026brelease announcement for more details. -
0.2.2423 Apr 2026Release notes
Open source →This release primarily adds a new
memory_usageroutine for reporting heap allocation sizes for theTimeZoneandZonedtypes. This release also acknowledges and updates the timeline expectations for a Jiff 1.0 release inREADME.md.Enhancements:
- #520:
Add
memory_usageto theTimeZoneandZonedtypes. - #535:
Improve comment in
Span::checked_addexample.
Bug fixes:
- #541: Update Jiff 1.0 timeline.
- #520:
Add
-
0.2.2303 Mar 2026Release notes
Open source →This release updates Jiff's bundled copy of the [IANA Time Zone Database] to
2026a. See the2026arelease announcement for more details. -
0.2.2228 Feb 2026Release notes
Open source →This release includes a bug fix where fallible conversions from signed durations to unsigned durations could panic in some cases.
Bug fixes:
- #526:
Fix a panicking bug that occurs for
std::time::Duration::try_from(SignedDuration::new(0, -1)).
- #526:
Fix a panicking bug that occurs for
-
0.2.2122 Feb 2026Release notes
Open source →This release contains a performance improvement and a bug fix for
civil::Date::newwhere it could panic on some inputs.Bug fixes:
- #523:
Fix a bug where
Date::newcould panic. This was a regression introduced injiff 0.2.20.
Performance:
- #518:
Improve
Timestamptocivil::DateTimeconversion performance by ~15%.
- #523:
Fix a bug where
-
0.2.2012 Feb 2026Release notes
Open source →This release contains a major internal refactor that moves off of using ranged integers internally. There are also some small bug fixes and added support for finding the system time zone on emscripten targets.
Enhancements:
- #11: Stop using ranged integers internally.
- #490: Add support for retrieving the system time zone on emscripten targets.
- #500:
Update comparison with the
timecrate in the Jiff documentation. - #502: Enable some non-default features for the Rust Playground deployment.
Bug fixes:
-
0.2.1905 Feb 2026Release notes
Open source →This is a small release with a performance optimization (with respect to doing heavily contended arithmetic on
Zonedvalues) and a bug fix for a panic that can occur when using%2sinstrftime.Enhancements:
- #491:
Avoid cloning
TimeZonefor consuming operations onZoned.
Bug fixes:
- #497:
Fix a panic in
timestamp.strftime("%2s").
- #491:
Avoid cloning
-
0.2.1806 Jan 2026Release notes
Open source →This release ships a sizeable refactor to the RFC 2822, RFC 9110, RC 3339, RFC 9557, ISO 8601 and friendly format printers. Specifically, they are now all monomorphic internally (instead of being generic over
jiff::fmt::Write) and write to uninitialized buffers. This improves runtime performance (sometimes dramatically so), and to a more modest degree, decreases binary size and improves compile times.This release also includes a bug fix where
DateTime::MIN.to_zoned(..)could panic.Enhancements:
- #460: Improve runtime performance and binary size of RFC 2822 printer.
- #461: Tweak behavior of printing min/max offsets in RFC 2822 and Temporal printers.
- #462:
Export fallible constructors for
jiff::SignedDuration. - #465: Improve runtime performance and binary size of the "friendly" duration printer.
- #468: Improve runtime performance and binary size of the Temporal ISO 8601 duration printer.
- #470: Improve runtime performance and binary size of the Temporal ISO 8601 datetime printer.
- #474:
Improve runtime performance and binary size of Jiff's
strftimeimplementation. - #477:
Fix a bug where time zone lookups for
civil::DateTime::MINcould panic.
-
0.2.1724 Dec 2025Release notes
Open source →This release contains binary size improvements to Jiff, more succinct error messages and some new minor APIs.
While Jiff 1.0 is overdue, I've been doing a lot of experimenting with improving Jiff's binary size and compile times. In particular, I want to spend time doing this before Jiff 1.0 so that we don't box ourselves into a corner. (For example, some binary size improvements may require minor API breaking changes.)
In this release, Jiff has switched to structured error handling internally in an effort to provide error predicates and also hopefully improve binary sizes and compile times. Overall this didn't have as big of an impact on binary sizes or compile times as I was hoping. I did take this opportunity to make Jiff's error messages a bit more succinct. In many cases, this involved de-duplicating some aspects of error messages and omitting user provided input in the messages. If you feel like there is a significant decrease in error message quality that isn't easily amended by callers providing additional context themselves, please open an issue.
This release also updates Jiff's bundled copy of the [IANA Time Zone Database] to
2025c. See the2025crelease announcement for more details.Enhancements:
- #412:
Add
Display,FromStr,SerializeandDeserializetrait implementations forjiff::civil::ISOWeekDate. These all use the ISO 8601 week date format. - #418:
Add some basic predicates to
jiff::Errorfor basic error introspection. - #453, #454: Switch to structured error handling internally.
- #456, #457, #458: Various improvements to binary size.
- #412:
Add
-
0.2.1607 Nov 2025Release notes
Open source →This release contains a number of enhancements and bug fixes that have accrued over the last few months. Most are small polishes. A couple of the bug fixes apply to panics that could occur when parsing invalid
TZstrings or invalidstrptimeformat strings.Also, parsing into a
Spanshould now be much faster (for both the ISO 8601 and "friendly" duration formats).Enhancements:
- #298:
Add Serde helpers for (de)serializing
std::time::Durationvalues. - #396:
Add
SubandAddtrait implementations forZoned(in addition to the already existing trait implementations for&Zoned). - #397:
Add
BrokenDownTime::set_meridiemand ensure it overrides the hour when formatting. - #409:
Switch dependency on
serdetoserde_core. This should help speed up compilation times in some cases. - #430:
Add new
Zoned::seriesAPI, making it consistent with the same API on other datetime types. - #432:
When
lenientmode is enabled forstrftime, Jiff will no longer error when the formatting string contains invalid UTF-8. - #432:
Formatting of
%yand%gno longer fails based on the specific year value. - #432:
Parsing of
%sis now a bit more consistent with other fields. Moreover,BrokenDownTime::{to_timestamp,to_zoned}will now prefer timestamps parsed with%sover any other fields that have been parsed. - #433:
Allow parsing just a
%sinto aZonedvia theEtc/Unknowntime zone.
Bug fixes:
- #386:
Fix a bug where
2087-12-31T23:00:00Zin theAfrica/Casablancatime zone could not be round-tripped (because its offset was calculated incorrectly as a result of not handling "permanent DST" POSIX time zones). - #407: Fix a panic that occurred when parsing an empty string as a POSIX time zone.
- #410:
Fix a panic that could occur when parsing
%:viastrptimeAPIs. - #414:
Update some parts of the documentation to indicate that
TimeZone::unknown()is a fallback forTimeZone::system()(instead of thejiff 0.1behavior of usingTimeZone::UTC). - #423: Fix a panicking bug when reading malformed TZif data.
- #426:
Fix a panicking bug when parsing century (
%C) viastrptime. - #445:
Fixed bugs with parsing durations like
-9223372036854775808sand-PT9223372036854775808S.
Performance:
- #445:
Parsing into
SpanorSignedDurationis now a fair bit faster in some cases.
- #298:
Add Serde helpers for (de)serializing
-
0.2.1513 Jun 2025Release notes
Open source →This release fixes a bug where error values were being constructed during parsing even in the success case. This was a regression introduced in
0.2.14as a result of trying to improve compilation times. Thankfully, fixing this regression doesn't seem to meaningfully impact the amount of IR generated by compiling Jiff.Bug fixes:
- #385: Fixes a performance regression for parsing.
-
0.2.1420 May 2025Release notes
Open source →This release includes a smattering of bug fixes, and hopefully a small improvement to the time it takes to compile Jiff. Also, in this release, when
TZis set to a non-empty but invalid value, Jiff will always fall back toEtc/Unknownwhen usingTimeZone::system(). This differs from previous behavior where Jiff would, in this case, attempt to read the system's default time zone. This change brings Jiff into consistency with existing Unix tooling likedate, and is also arguably a better failure mode. That is, whenTZis set but invalid, we shouldn't silently fall back to the default system time zone, but instead do something that indicates something has potentially gone wrong.Enhancements:
Bug fixes:
-
0.2.1306 May 2025Release notes
Open source →This release fixes a bug in a corner case where
TimeZone::followingcould sometimes omit the last time zone transition. This could only happen in time zones that once had daylight saving time, but ended it. This did not have an impact on other Jiff APIs that handle daylight saving time.Bug fixes:
- #362:
Fix a bug where
TimeZone::followingcould omit the last historical time zone transition.
- #362:
Fix a bug where
-
0.2.1203 May 2025Release notes
Open source →This release fixes a couple bugs in Jiff's parser. In particular, a regression was introduced in
jiff 0.2.11where its RFC 2822 parser could panic on some inputs. Previous releases of Jiff are unaffected.Bug fixes:
-
0.2.1101 May 2025Release notes
Open source →This release includes new APIs for customizing Jiff's
strtimebehavior along with a few minor bug fixes. Jiff'sstrtimeformatting API has also been optimized. It's about twice as fast as it was.This release also coincides with the publication of
jiff-icu 0.2.0-beta.2, which has support foricu 2.0.0-beta.2.Enhancements:
- #338:
Add support for the
%c,%r,%Xand%xconversion specifiers. - #341:
Add support for
%qinjiff::fmt::strtime(prints quarter of year). - #342:
Add support for
%::zand%:::zinjiff::fmt::strtime. - #344:
Add support for
%Ninjiff::fmt::strtime(alias for%9f). - #350:
Add a "lenient" mode for
strtimeformatting APIs that ignores most errors.
Bug fixes:
- #328:
Document default precision behavior of
Displayimpls for datetime types. - #340: Allow whitespace in more places in RFC 2822 parser (improves spec compliance).
- #346:
TimeZone::get("UTC")should now always returnTimeZone::UTC.
Performance:
- #338:
Jiff's
strftimeAPIs are now approximately twice as fast as they were. Performance should be comparable tochronoandtime's prebuilt APIs.
- #338:
Add support for the
-
0.2.1021 Apr 2025Release notes
Open source →This release includes a bug fix for parsing
Tuesdaywhen using%Avia Jiff'sstrptimeAPIs. Specifically, it would recognizeTuedayinstead ofTuesday.Bug fixes:
- #333:
Fix typo in
strptimeparsing fromTuedaytoTuesday.
- #333:
Fix typo in
-
0.2.919 Apr 2025Release notes
Open source →This release includes a bug fix that, in debug mode, could result in datetime types having different hashes for the same value. This could cause problems, for example, if you are using datetimes as keys in a hash map. This problem didn't exist when Jiff was compiled in release mode.
This release also improves the panic message shown when the
jsfeature isn't enabled and the current time is requested onwasm32-unknown-unknowntargets.Enhancements:
- #296:
Provide a better panic message when
Zoned::now()fails on WASM.
Bug fixes:
- #330:
Fix bug where
Hashon datetime types could yield different hash values for the same underlying date/time.
- #296:
Provide a better panic message when
-
0.2.813 Apr 2025Release notes
Open source →This release fixes a bug where the constructors on
SignedDurationfor floating point durations could panic (in debug mode) or produce incorrect results (in release mode). This bug only impacts users of thetry_from_secs_{f32,f64}andfrom_secs_{f32,f64}methods onSignedDuration.Enhancements:
- #326:
Add an alternate
Debugimpl forSignedDurationthat only shows its second and nanosecond components (while using only one component when the other is zero).
Bug fixes:
- #324:
Fix a bug that could produce a panic or incorrect results in
SignedDuration::(try_)?from_secs_{f32,f64}.
- #326:
Add an alternate
-
0.2.713 Apr 2025Release notes
Open source →This release includes a bug fix that changes how an empty but set
TZenvironment variable is interpreted (as indistinguishable fromTZ=UTC). This also includes a new enabled by default create feature,perf-inline, which allows toggling Jiff's use ofinline(always). This may help improve compile times or decrease binary size.Enhancements:
- #320: Remove some internal uses of generics to mildly improve compile times.
- #321:
Add
perf-inlinecrate feature for controllinginline(always)annotations.
Bug fixes:
- #311:
Make
TZ=indistinguishable fromTZ=UTC.
-
0.2.607 Apr 2025Release notes
Open source →This release includes a few bug fixes and support for discovering the IANA Time Zone Database automatically on Illumos.
Enhancements:
- #315: Add support for automatically finding the tzdb on Illumos.
Bug fixes:
-
0.2.523 Mar 2025Release notes
Open source →This release updates Jiff's bundled copy of the [IANA Time Zone Database] to
2025b. See the2025brelease announcement for more details.Enhancements:
- #300:
Update
jiff-tzdbto2025b.
- #300:
Update
-
0.2.410 Mar 2025Release notes
Open source →This is another small release that fixes a problem where Jiff could break builds if they relied on inference for integer comparisons. Specifically, Jiff uses internal trait impls to make comparing its internal ranged integers more convenient. But Rust the language has no concept of "internal" trait impls, and thus this can impact type inference. If code was written in a way that relies on a singular trait impl that is available, then adding Jiff to the project can cause it to break.
This isn't arguably Jiff's fault per se, but since these trait impls were just about internal convenience and not essential to Jiff's design, we adopt a pragmatic approach and just remove them.
Bug fixes:
- #293: Remove internal trait impls that can cause breaks due to inference failures.
-
0.2.307 Mar 2025Release notes
Open source →This is a small release that fixes a bug in the handling of POSIX time zones in some cases. Specifically, the implementation of
Date::yesterdaywas wrong when the date was the first of the month. This was a regression introduced in0.2.2and was not present in older releases. More test coverage has been added.Bug fixes:
- #290:
Fix bug in implementation of
Date::yesterday.
- #290:
Fix bug in implementation of
-
0.2.206 Mar 2025Release notes
Open source →This release of Jiff includes a new opt-in proc macro for embedding a
TimeZoneinto your binary. Just enable Jiff'sstaticfeature, and this will print the current time in theAmerica/New_Yorktime zone:use jiff::{ tz::{self, TimeZone}, Timestamp, }; fn main() { static TZ: TimeZone = tz::get!("America/New_York"); let zdt = Timestamp::now().to_zoned(TZ.clone()); println!("{zdt}"); }This enables
TimeZoneto be meaningfully used in core-only environments, even when dynamic memory allocation isn't available.This release also features a number of performance improvements for time zone lookups. In some cases, the improvement is significant (by an order of magnitude).
Additionally, the IANA Time Zone Database embedded into
jiff-tzdbnow uses "rearguard" semantics. This means that the boolean flag indicating whether daylight saving time is active or not (only accessible viaTimeZone::to_offset_info) will respect the actual definition of daylight saving time. (This is relevant, for example, for time zones likeEurope/Dublin, where their summer time is legally known as their standard time, but is in effect daylight saving time.)Enhancements:
- #256:
Add
tz::{get,include}macros for time zone support in core-only environments. - #258:
Switch to
rearguardtzdb data injiff-tzdband document it. - #259:
De-duplicate TZif data in
jiff-tzdb. - #273:
Add "crate features" documentation to
jiff-sqlxandjiff-diesel. - #277:
Document semver guarantee for error conditions on
Timestampconstructors. - #277: Greatly optimize time zone lookups (for both timestamps and civil datetimes).
Bug fixes:
- #261:
Improve the documentation for
ZonedWith::nanosecondandZonedWith::subsec_nanosecond.
- #256:
Add