From f6681eb44c0ea0772004e56eb68fcbd9023d971e Mon Sep 17 00:00:00 2001 From: Geon Kim Date: Sat, 11 Mar 2023 09:56:28 +0900 Subject: [PATCH] time: correct comment of tzset --- src/time/zoneinfo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/time/zoneinfo.go b/src/time/zoneinfo.go index d83e4d37d1..4edcf3d98f 100644 --- a/src/time/zoneinfo.go +++ b/src/time/zoneinfo.go @@ -264,12 +264,12 @@ func (l *Location) firstZoneUsed() bool { } // tzset takes a timezone string like the one found in the TZ environment -// variable, the end of the last time zone transition expressed as seconds +// variable, the time of the last time zone transition expressed as seconds // since January 1, 1970 00:00:00 UTC, and a time expressed the same way. // We call this a tzset string since in C the function tzset reads TZ. // The return values are as for lookup, plus ok which reports whether the // parse succeeded. -func tzset(s string, initEnd, sec int64) (name string, offset int, start, end int64, isDST, ok bool) { +func tzset(s string, lastTxSec, sec int64) (name string, offset int, start, end int64, isDST, ok bool) { var ( stdName, dstName string stdOffset, dstOffset int @@ -290,7 +290,7 @@ func tzset(s string, initEnd, sec int64) (name string, offset int, start, end in if len(s) == 0 || s[0] == ',' { // No daylight savings time. - return stdName, stdOffset, initEnd, omega, false, true + return stdName, stdOffset, lastTxSec, omega, false, true } dstName, s, ok = tzsetName(s)