pub struct TimeZone { /* private fields */ }Expand description
The formatting context’s time zone: the default of timeZone
(plans/03-runtime.md §6). Owned — a per-request zone need not be
'static.
Implementations§
Source§impl TimeZone
impl TimeZone
Sourcepub const fn offset(seconds: i32) -> Option<TimeZone>
pub const fn offset(seconds: i32) -> Option<TimeZone>
A fixed offset, in seconds east of UTC; None unless |seconds| <
86,400.
Sourcepub fn named(name: &str) -> Option<TimeZone>
pub fn named(name: &str) -> Option<TimeZone>
The IANA zone name; None unless it is a well-formed RFC 9557
time-zone-name of at most 64 bytes.
Sourcepub fn rules(rule: &str) -> Option<TimeZone>
pub fn rules(rule: &str) -> Option<TimeZone>
A zone that follows the POSIX TZ rule rule: an offset for standard
time and, where the rule has one, another for daylight saving time
between two dates each year (EST5EDT,M3.2.0,M11.1.0). What a
native application’s system zone is when it has no IANA name, so
that its dates follow the system’s changes of offset rather than the
offset in force when it started.
The host evaluates it, as it does an IANA name: mf2-host-std does;
a host that does not (the browser’s) leaves a date in it a Bad
Option with a fallback, as for a zone it does not know. None
unless rule is 1 to 63 printable ASCII characters; whether it is a
rule the host can read, only the host knows.
Sourcepub fn as_option(&self) -> ZoneOption<'_>
pub fn as_option(&self) -> ZoneOption<'_>
The zone as an option value: Utc, Offset or Named — a POSIX TZ
rule (TimeZone::rules) as Named, which the host evaluates.
Trait Implementations§
impl Copy for TimeZone
Source§impl Debug for TimeZone
TimeZone("Europe/Paris"), TimeZone(Offset(3600)), TimeZone(Utc), or
TimeZone(Rules("EST5EDT,M3.2.0,M11.1.0")).
impl Debug for TimeZone
TimeZone("Europe/Paris"), TimeZone(Offset(3600)), TimeZone(Utc), or
TimeZone(Rules("EST5EDT,M3.2.0,M11.1.0")).