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#

silk
pub struct WindowsTimeZone

The time zone setting of Windows.

Implementation WindowsTimeZone#

silk
impl WindowsTimeZone

Associated function keyName#

silk
pub effect fn keyName() -> Option<Bytes> ! OutOfMemoryError ? &mut Allocator

Returns 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#

  • OutOfMemoryError if the Allocator cannot supply the name.

Category: Windows platform.

Profiles: x86_64-pc-windows-msvc.

View the source of this page