From 98f16ad1123ffcdec1122a0f7b535b590e879423 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Tue, 17 Dec 2013 02:43:14 -0500 Subject: [PATCH] =?utf8?q?time:=20fix=20test=20error=20in=20Chinese=20edit?= =?utf8?q?ion=20of=20Windows=20On=20the=20Chinese=20Windows=20XP=20system?= =?utf8?q?=20that=20I'm=20using,=20GetTimeZoneInformation=20returns=20a=20?= =?utf8?q?struct=20containing=20"=E4=B8=AD=E5=9B=BD=E6=A0=87=E5=87=86?= =?utf8?q?=E6=97=B6=E9=97=B4"=20(China=20Standard=20Time=20in=20Chinese)?= =?utf8?q?=20in=20both=20StandardName=20and=20DaylightName=20(which=20is?= =?utf8?q?=20correct,=20because=20China=20does=20not=20use=20DST).=20Howev?= =?utf8?q?er,=20in=20registry,=20under=20key=20HKLM\SOFTWARE\Microsoft\Win?= =?utf8?q?dows=20NT\CurrentVersion\Time=20Zones\China=20Standard=20Time,?= =?utf8?q?=20the=20key=20Std=20and=20Dlt=20contain=20"=E4=B8=AD=E5=9B=BD?= =?utf8?q?=E6=A0=87=E5=87=86=E6=97=B6=E9=97=B4"=20(China=20Standard=20Time?= =?utf8?q?=20in=20Chinese)=20and=20"=E4=B8=AD=E5=9B=BD=E5=A4=8F=E5=AD=A3?= =?utf8?q?=E6=97=B6=E9=97=B4"=20(China=20Summer=20Time=20in=20Chinese)=20r?= =?utf8?q?espectively.=20This=20means=20that=20time.toEnglishName()=20cann?= =?utf8?q?ot=20determine=20the=20abbreviation=20for=20the=20local=20timezo?= =?utf8?q?ne=20(CST)=20and=20causes=20test=20failures=20(time.Local=20is?= =?utf8?q?=20empty)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 be4e5c13ff..7e4d146d89 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 -- 2.48.1