Class SharedTimeZones
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
idstring- The ID of the time zone.
fallbackOffsetTimeSpan- The time zone offset to be used as a fallback when
idis not found.
Returns
ToOffsetString(TimeSpan)
Converts a time span as an offset to a string representation.
public static string ToOffsetString(this TimeSpan offset)
Parameters
offsetTimeSpan- 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
tzTimeZoneInfo- The time zone to be converted.
timeDateTimeOffset- The date time offset.
Returns
- string
- A string representation of the time zone.