Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryGetTimeZone()

static TimeZoneInfoResult System.TimeZoneInfo.TryGetTimeZone ( string id,
bool dstDisabled,
out TimeZoneInfo value,
out Exception e,
CachedData cachedData,
bool alwaysFallbackToLocalMachine = false )
inlinestaticprivate

Definition at line 2104 of file TimeZoneInfo.cs.

2105 {
2107 if (timeZoneInfoResult != 0)
2108 {
2109 bool idIsIana;
2111 if (alternativeId != null)
2112 {
2115 {
2117 if (value._equivalentZones == null)
2118 {
2119 timeZoneInfo = new TimeZoneInfo(id, value._baseUtcOffset, value._displayName, value._standardDisplayName, value._daylightDisplayName, value._adjustmentRules, dstDisabled && value._supportsDaylightSavingTime, idIsIana);
2121 lock (value._equivalentZones)
2122 {
2123 value._equivalentZones.Add(timeZoneInfo);
2124 }
2125 }
2126 else
2127 {
2128 foreach (TimeZoneInfo equivalentZone in value._equivalentZones)
2129 {
2130 if (equivalentZone.Id == id)
2131 {
2133 break;
2134 }
2135 }
2136 if (timeZoneInfo == null)
2137 {
2138 timeZoneInfo = new TimeZoneInfo(id, value._baseUtcOffset, value._displayName, value._standardDisplayName, value._daylightDisplayName, value._adjustmentRules, dstDisabled && value._supportsDaylightSavingTime, idIsIana);
2139 lock (value._equivalentZones)
2140 {
2141 value._equivalentZones.Add(timeZoneInfo);
2142 }
2143 }
2144 }
2146 }
2147 }
2148 }
2149 return timeZoneInfoResult;
2150 }
static TimeZoneInfoResult TryGetTimeZoneUsingId(string id, bool dstDisabled, out TimeZoneInfo value, out Exception e, CachedData cachedData, bool alwaysFallbackToLocalMachine)
static string GetAlternativeId(string id, out bool idIsIana)
TimeZoneInfo(string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, AdjustmentRule[] adjustmentRules, bool disableDaylightSavingTime, bool hasIanaId=false)

References System.TimeZoneInfo.TimeZoneInfo(), System.Runtime.Serialization.Dictionary, System.TimeZoneInfo.GetAlternativeId(), System.TimeZoneInfo.TryGetTimeZoneUsingId(), and System.value.

Referenced by System.TimeZoneInfo.FindSystemTimeZoneById(), System.TimeZoneInfo.GetLocalTimeZone(), and System.TimeZoneInfo.PopulateAllSystemTimeZones().