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

◆ GetLocalTimeZone()

static TimeZoneInfo System.TimeZoneInfo.GetLocalTimeZone ( CachedData cachedData)
inlinestaticprivate

Definition at line 2464 of file TimeZoneInfo.cs.

2465 {
2468 if (dynamicTimeZoneInformation == uint.MaxValue)
2469 {
2470 return CreateCustomTimeZone("Local", TimeSpan.Zero, "Local", "Local");
2471 }
2472 string timeZoneKeyName = pTimeZoneInformation.GetTimeZoneKeyName();
2473 if (timeZoneKeyName.Length != 0 && TryGetTimeZone(timeZoneKeyName, pTimeZoneInformation.DynamicDaylightTimeDisabled != 0, out var value, out var e, cachedData) == TimeZoneInfoResult.Success)
2474 {
2475 return value;
2476 }
2478 bool dstDisabled;
2481 {
2482 return value2;
2483 }
2485 }
static uint GetDynamicTimeZoneInformation(out TIME_DYNAMIC_ZONE_INFORMATION pTimeZoneInformation)
static string FindIdFromTimeZoneInformation(in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone, out bool dstDisabled)
static TimeZoneInfo GetLocalTimeZoneFromWin32Data(in Interop.Kernel32.TIME_ZONE_INFORMATION timeZoneInformation, bool dstDisabled)
static TimeZoneInfo CreateCustomTimeZone(string id, TimeSpan baseUtcOffset, string? displayName, string? standardDisplayName)
static TimeZoneInfoResult TryGetTimeZone(string id, bool dstDisabled, out TimeZoneInfo value, out Exception e, CachedData cachedData, bool alwaysFallbackToLocalMachine=false)

References System.TimeZoneInfo.CreateCustomTimeZone(), System.Runtime.Serialization.Dictionary, System.TimeZoneInfo.FindIdFromTimeZoneInformation(), Interop.Kernel32.GetDynamicTimeZoneInformation(), System.TimeZoneInfo.GetLocalTimeZoneFromWin32Data(), System.text, System.TimeZoneInfo.TryGetTimeZone(), System.value, and System.TimeSpan.Zero.

Referenced by System.TimeZoneInfo.CachedData.CreateLocal().