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

◆ TryCompareTimeZoneInformationToRegistry()

static bool System.TimeZoneInfo.TryCompareTimeZoneInformationToRegistry ( in Interop::Kernel32::TIME_ZONE_INFORMATION timeZone,
string id,
out bool dstDisabled )
inlinestaticprivate

Definition at line 2701 of file TimeZoneInfo.cs.

2702 {
2703 dstDisabled = false;
2704 using RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\" + id, writable: false);
2705 if (registryKey == null)
2706 {
2707 return false;
2708 }
2710 {
2711 return false;
2712 }
2714 {
2715 return false;
2716 }
2717 bool flag = dstDisabled || CheckDaylightSavingTimeNotSupported(in timeZone) || (timeZone.DaylightBias == dtzi.DaylightBias && timeZone.DaylightDate.Equals(in dtzi.DaylightDate));
2718 if (flag)
2719 {
2720 string a = registryKey.GetValue("Std", string.Empty) as string;
2721 flag = string.Equals(a, timeZone.GetStandardName(), StringComparison.Ordinal);
2722 }
2723 return flag;
2724 }
static readonly RegistryKey LocalMachine
Definition Registry.cs:9
static bool TryCompareStandardDate(in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone, in Interop.Kernel32.REG_TZI_FORMAT registryTimeZoneInfo)
static bool CheckDaylightSavingTimeNotSupported(in Interop.Kernel32.TIME_ZONE_INFORMATION timeZone)
static unsafe bool TryGetTimeZoneEntryFromRegistry(RegistryKey key, string name, out Interop.Kernel32.REG_TZI_FORMAT dtzi)

References System.TimeZoneInfo.CheckDaylightSavingTimeNotSupported(), System.Runtime.Serialization.Dictionary, Internal.Win32.Registry.LocalMachine, System.TimeZoneInfo.TryCompareStandardDate(), and System.TimeZoneInfo.TryGetTimeZoneEntryFromRegistry().

Referenced by System.TimeZoneInfo.FindIdFromTimeZoneInformation().