Table of Contents

Class SharedTimeZones

Namespace
Cryville.EEW
Assembly
Cryville.EEW.dll
Shared time zones.
public static class SharedTimeZones
Inheritance
SharedTimeZones
Inherited Members

Methods

GetTimeZone(string, TimeSpan)

Gets a time zone.
public static TimeZoneInfo GetTimeZone(string id, TimeSpan fallbackOffset)

Parameters

id string
The ID of the time zone.
fallbackOffset TimeSpan
The time zone offset to be used as a fallback when id is not found.

Returns

TimeZoneInfo

ToOffsetString(TimeSpan)

Converts a time span as an offset to a string representation.
public static string ToOffsetString(this TimeSpan offset)

Parameters

offset TimeSpan
The time span to be converted.

Returns

string
A string representation of the time span as an offset.

ToTimeZoneString(TimeZoneInfo, DateTimeOffset)

Converts a time zone to a string representation.
public static string ToTimeZoneString(this TimeZoneInfo tz, DateTimeOffset time)

Parameters

tz TimeZoneInfo
The time zone to be converted.
time DateTimeOffset
The date time offset.

Returns

string
A string representation of the time zone.