Skip to main content

Module timezone

Module timezone 

Source
Expand description

Timezone for timestamp arrays

Without additional features, Tz only supports fixed offsets such as +09:00. The chrono-tz and jiff features add named timezones from the IANA time zone database, such as America/Los_Angeles:

  • chrono-tz resolves names with chrono-tz, which precomputes each zone’s transitions up to 2099 and keeps the last offset for any later instant, so daylight saving no longer changes it.
  • jiff resolves names with jiff, which applies each zone’s daylight saving rules to any instant, as java.time and libc do.

When both are enabled, jiff is used. Cargo unifies features across a build, so enabling jiff for any crate changes how named timezones are resolved for every crate in the build.

The jiff feature is experimental. It is a step in moving arrow-rs from chrono to jiff, so what it covers and how it behaves may change, even between minor releases.

Each feature bundles its own copy of the database, which may be a different release, so the two can also disagree wherever the database changed between releases. tzdb_version returns the release in use.

Re-exportsΒ§

use arrow_schema::ArrowError; πŸ”’
use chrono::DateTime; πŸ”’
use chrono::FixedOffset; πŸ”’
use chrono::NaiveDateTime; πŸ”’
pub use private::Tz;
pub use private::TzOffset;

ModulesΒ§

private πŸ”’

StructsΒ§

GapInfo
Represents the information of a gap.

FunctionsΒ§

parse_fixed_offset πŸ”’
Parses a fixed offset of the form β€œ+09:00”, β€œ-09” or β€œ+0930”
tzdb_version
Returns the release of the IANA time zone database that resolves named timezones, such as "2026c".