From 98f16ad1123ffcdec1122a0f7b535b590e879423 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Tue, 17 Dec 2013 02:43:14 -0500 Subject: [PATCH] =?UTF-8?q?time:=20fix=20test=20error=20in=20Chinese=20edi?= =?UTF-8?q?tion=20of=20Windows=20On=20the=20Chinese=20Windows=20XP=20syste?= =?UTF-8?q?m=20that=20I'm=20using,=20GetTimeZoneInformation=20returns=20a?= =?UTF-8?q?=20struct=20containing=20"=E4=B8=AD=E5=9B=BD=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=97=B6=E9=97=B4"=20(China=20Standard=20Time=20in=20Chinese)?= =?UTF-8?q?=20in=20both=20StandardName=20and=20DaylightName=20(which=20is?= =?UTF-8?q?=20correct,=20because=20China=20does=20not=20use=20DST).=20Howe?= =?UTF-8?q?ver,=20in=20registry,=20under=20key=20HKLM\SOFTWARE\Microsoft\W?= =?UTF-8?q?indows=20NT\CurrentVersion\Time=20Zones\China=20Standard=20Time?= =?UTF-8?q?,=20the=20key=20Std=20and=20Dlt=20contain=20"=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E6=A0=87=E5=87=86=E6=97=B6=E9=97=B4"=20(China=20Standard=20Tim?= =?UTF-8?q?e=20in=20Chinese)=20and=20"=E4=B8=AD=E5=9B=BD=E5=A4=8F=E5=AD=A3?= =?UTF-8?q?=E6=97=B6=E9=97=B4"=20(China=20Summer=20Time=20in=20Chinese)=20?= =?UTF-8?q?respectively.=20This=20means=20that=20time.toEnglishName()=20ca?= =?UTF-8?q?nnot=20determine=20the=20abbreviation=20for=20the=20local=20tim?= =?UTF-8?q?ezone=20(CST)=20and=20causes=20test=20failures=20(time.Local=20?= =?UTF-8?q?is=20empty)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/43210043 --- src/pkg/time/zoneinfo_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/time/zoneinfo_windows.go b/src/pkg/time/zoneinfo_windows.go index be4e5c13ff0..7e4d146d89e 100644 --- a/src/pkg/time/zoneinfo_windows.go +++ b/src/pkg/time/zoneinfo_windows.go @@ -54,7 +54,7 @@ func matchZoneKey(zones syscall.Handle, kname string, stdname, dstname string) ( if err != nil { return false, err } - if s != dstname { + if s != dstname && dstname != stdname { return false, nil } return true, nil