Crate time
Available on crate feature
time only.Expand description
Time-related types and utilities.
This crate re-exports types from core::time and chrono.
The tz feature enables support for IANA time zones using the
[chrono_tz] crate.
This crate is focused on abstract date and time handling.
Compared to, for example, tokio::time, it doesn’t contain scheduling
utilities like sleep.
Structs§
- Chrono
Parse Error - An error from the
parsefunction. - Date
Time - ISO 8601 combined date and time with time zone.
- Days
- A duration in calendar days.
- Duration
- A
Durationtype to represent a span of time, typically used for system timeouts. - Fixed
Offset - The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
- Iana
Time Zone Offset - Instant
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration. - Interval
- Half-open time interval.
- IsoWeek
- ISO 8601 week.
- Naive
Date - ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
- Naive
Date Time - ISO 8601 combined date and time without timezone.
- Naive
Time - ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
- Naive
Weekday Time - Weekday and time combination without timezone information.
- Parse
Error - Error returned when parsing a time-related type fails.
- Parse
Weekday Error - An error resulting from reading
Weekdayvalue withFromStr. - Time
Delta - Time duration with nanosecond precision.
- Time
OfDay Period - A time period defined by a start and end time of day.
- Time
Zone Parse Error - Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
- Weekday
Time Period - A half-open time period within a week.
Enums§
- Iana
Time Zone - TimeZones built at compile time from the tz database
- Parse
Error Kind - The category of parse error
- Weekday
- The day of week.