Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Port TimeZoneInfo cleanups from CoreCLR #2400

Merged
merged 7 commits into from
Dec 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ private static bool TryCreateAdjustmentRules(string id, REGISTRY_TIME_ZONE_INFOR
try
{
using (RegistryKey dynamicKey = RegistryKey.GetBaseKey(RegistryKey.HKEY_LOCAL_MACHINE).OpenSubKey(
String.Format(CultureInfo.InvariantCulture, "{0}\\{1}\\Dynamic DST",
c_timeZonesRegistryHive, id),
c_timeZonesRegistryHive + "\\" + id + "\\Dynamic DST",
false
))
{
Expand Down Expand Up @@ -788,8 +787,7 @@ static unsafe private Boolean TryCompareTimeZoneInformationToRegistry(TIME_ZONE_
{
dstDisabled = false;
using (RegistryKey key = RegistryKey.GetBaseKey(RegistryKey.HKEY_LOCAL_MACHINE).OpenSubKey(
String.Format(CultureInfo.InvariantCulture, "{0}\\{1}",
c_timeZonesRegistryHive, id),
c_timeZonesRegistryHive + "\\" + id,
false
))
{
Expand Down Expand Up @@ -1063,8 +1061,7 @@ private static TimeZoneInfoResult TryGetTimeZoneByRegistryKey(string id, out Tim
e = null;

using (RegistryKey key = RegistryKey.GetBaseKey(RegistryKey.HKEY_LOCAL_MACHINE).OpenSubKey(
String.Format(CultureInfo.InvariantCulture, "{0}\\{1}",
c_timeZonesRegistryHive, id),
c_timeZonesRegistryHive + "\\" + id,
false
))
{
Expand Down
Loading