aboutsummaryrefslogtreecommitdiff
path: root/src/time/zoneinfo_windows.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2024-03-20 12:54:39 -0700
committerColin Cross <ccross@android.com>2024-03-20 14:11:54 -0700
commitfbe2133b4d3417adc93daa3819fccf52d2bb66ea (patch)
tree489499c233d3e979128afcc077ea1c6c01725ddf /src/time/zoneinfo_windows.go
parent68a2d6d0813d288a1149f79a7223284fa2f5559f (diff)
parentdb6097f8cbaceaed02051850d2411c88b763a0c3 (diff)
downloadgo-fbe2133b4d3417adc93daa3819fccf52d2bb66ea.tar.gz
Merge tag 'upstream-go1.22.1'HEADmastermain
Bug: 330574836 Test: builds Change-Id: Icaf805d49ad96dd3f2960c5f92b4eeb7c131291c
Diffstat (limited to 'src/time/zoneinfo_windows.go')
-rw-r--r--src/time/zoneinfo_windows.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/time/zoneinfo_windows.go b/src/time/zoneinfo_windows.go
index 76d79759f7..c9f38ea3e0 100644
--- a/src/time/zoneinfo_windows.go
+++ b/src/time/zoneinfo_windows.go
@@ -20,8 +20,8 @@ var platformZoneSources []string // none: Windows uses system calls instead
// time apply to all previous and future years as well.
// matchZoneKey checks if stdname and dstname match the corresponding key
-// values "MUI_Std" and MUI_Dlt" or "Std" and "Dlt" (the latter down-level
-// from Vista) in the kname key stored under the open registry key zones.
+// values "MUI_Std" and MUI_Dlt" or "Std" and "Dlt" in the kname key stored
+// under the open registry key zones.
func matchZoneKey(zones registry.Key, kname string, stdname, dstname string) (matched bool, err2 error) {
k, err := registry.OpenKey(zones, kname, registry.READ)
if err != nil {
@@ -30,12 +30,10 @@ func matchZoneKey(zones registry.Key, kname string, stdname, dstname string) (ma
defer k.Close()
var std, dlt string
- if err = registry.LoadRegLoadMUIString(); err == nil {
- // Try MUI_Std and MUI_Dlt first, fallback to Std and Dlt if *any* error occurs
- std, err = k.GetMUIStringValue("MUI_Std")
- if err == nil {
- dlt, err = k.GetMUIStringValue("MUI_Dlt")
- }
+ // Try MUI_Std and MUI_Dlt first, fallback to Std and Dlt if *any* error occurs
+ std, err = k.GetMUIStringValue("MUI_Std")
+ if err == nil {
+ dlt, err = k.GetMUIStringValue("MUI_Dlt")
}
if err != nil { // Fallback to Std and Dlt
if std, _, err = k.GetStringValue("Std"); err != nil {