Crate time

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§

ChronoParseError
An error from the parse function.
DateTime
ISO 8601 combined date and time with time zone.
Days
A duration in calendar days.
Duration
A Duration type to represent a span of time, typically used for system timeouts.
FixedOffset
The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
IanaTimeZoneOffset
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
Interval
Half-open time interval.
IsoWeek
ISO 8601 week.
NaiveDate
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.
NaiveDateTime
ISO 8601 combined date and time without timezone.
NaiveTime
ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
NaiveWeekdayTime
Weekday and time combination without timezone information.
ParseError
Error returned when parsing a time-related type fails.
ParseWeekdayError
An error resulting from reading Weekday value with FromStr.
TimeDelta
Time duration with nanosecond precision.
TimeOfDayPeriod
A time period defined by a start and end time of day.
TimeZoneParseError
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).
WeekdayTimePeriod
A half-open time period within a week.

Enums§

IanaTimeZone
TimeZones built at compile time from the tz database
ParseErrorKind
The category of parse error
Weekday
The day of week.

Traits§

Datelike
The common set of methods for date component.
Offset
The offset from the local time to UTC.
TimeZone
The time zone.