silk.platform.windows.time_zone.
The time zone setting of Windows.
When to use#
The OsLocalZone provider of silk.time.zones_native uses WindowsTimeZone on Windows.
Application code requires the LocalZone effect of silk.time.zones and does not call this
module.
Details#
Windows names its zones with its own names, such as E. South America Standard Time, and
ships no IANA zone files. WindowsTimeZone.keyName reads the name of the zone that the
machine is set to, and the provider maps it to an IANA name with the table of the Unicode
CLDR project in the time zone bundle of the standard library.
Import as WindowsTimeZone with import silk.platform.windows.time_zone { WindowsTimeZone }.
Public declarations: 1.
WindowsTimeZone#
pub struct WindowsTimeZoneThe time zone setting of Windows.
Implementation WindowsTimeZone#
impl WindowsTimeZoneAssociated function keyName#
pub effect fn keyName() -> Option<Bytes> ! OutOfMemoryError ? &mut AllocatorReturns the Windows name of the zone that the machine is set to, such as
E. South America Standard Time, or None if Windows does not answer or the name is
empty or not ASCII.
Errors#
OutOfMemoryErrorif theAllocatorcannot supply the name.
Category: Windows platform.
Profiles: x86_64-pc-windows-msvc.