Skip to content

Commit f6681eb

Browse files
committed
time: correct comment of tzset
1 parent 62616b1 commit f6681eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/time/zoneinfo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ func (l *Location) firstZoneUsed() bool {
264264
}
265265

266266
// tzset takes a timezone string like the one found in the TZ environment
267-
// variable, the end of the last time zone transition expressed as seconds
267+
// variable, the time of the last time zone transition expressed as seconds
268268
// since January 1, 1970 00:00:00 UTC, and a time expressed the same way.
269269
// We call this a tzset string since in C the function tzset reads TZ.
270270
// The return values are as for lookup, plus ok which reports whether the
271271
// parse succeeded.
272-
func tzset(s string, initEnd, sec int64) (name string, offset int, start, end int64, isDST, ok bool) {
272+
func tzset(s string, lastTxSec, sec int64) (name string, offset int, start, end int64, isDST, ok bool) {
273273
var (
274274
stdName, dstName string
275275
stdOffset, dstOffset int
@@ -290,7 +290,7 @@ func tzset(s string, initEnd, sec int64) (name string, offset int, start, end in
290290

291291
if len(s) == 0 || s[0] == ',' {
292292
// No daylight savings time.
293-
return stdName, stdOffset, initEnd, omega, false, true
293+
return stdName, stdOffset, lastTxSec, omega, false, true
294294
}
295295

296296
dstName, s, ok = tzsetName(s)

0 commit comments

Comments
 (0)