BurntSushi/jiff

return a global tzdb when `tzdb-zoneinfo` and `tzdb-concatenated` are disabled but where `tzdb-bundle-{always,platform}` is enabled

Open

#533 aberto em 2 de abr. de 2026

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)Rust (102 forks)github user discovery
enhancementhelp wanted

Métricas do repositório

Stars
 (2.733 stars)
Métricas de merge de PR
 (Mesclagem média 4d 22h) (9 fundiu PRs em 30d)

Description

I am trying to use jiff with the following features:

jiff = { version = "0.2.23", default-features = false, features = [
  "alloc",
  "perf-inline",
  "serde",
  "tzdb-bundle-always"
] }

The intention behind this is that I do not want jiff to do any IO (read files or environment variables), and I require handling of timezones, therefore I am bundling the tzdb and implicitly setting no_std. I am not allowed / do not want to do unnecessary syscalls.

Is this the correct way to do this? currently, this panics with:

thread 'main' (35272228) panicked at src/main.rs:161:30:
called `Result::unwrap()` on an `Err` value: failed to find time zone `America/New_York`, since there is no global time zone database configured (and is currently impossible to do so without Jiff's `std` feature enabled, if you need this functionality, please file an issue on Jiff's tracker with your use case)

(this is when constructing any civil time, such as:

                    // clock: jiff::civil::date(2024, 7, 4)
                    //     .at(12, 0, 0, 0)
                    //     .in_tz("America/New_York")
                    //     .unwrap(),

)

Thank you.

Guia do colaborador