Commit 6203a79b authored by Kevin Burke's avatar Kevin Burke Committed by Rob Pike

time: remove unused parameter

lookupName is only called in one location, and one of the return
values is unused, so let's remove it.

Change-Id: I35e22c7ec611e8eb349deb4f0561e212f7d9de0b
Reviewed-on: https://go-review.googlesource.com/55232Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: default avatarRob Pike <r@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
parent c8e9fd5d
......@@ -1071,7 +1071,7 @@ func parse(layout, value string, defaultLocation, local *Location) (Time, error)
t := Date(year, Month(month), day, hour, min, sec, nsec, UTC)
// Look for local zone with the given offset.
// If that zone was in effect at the given time, use it.
offset, _, ok := local.lookupName(zoneName, t.unixSec())
offset, ok := local.lookupName(zoneName, t.unixSec())
if ok {
t.addSec(-int64(offset))
t.setLoc(local)
......
......@@ -223,7 +223,7 @@ func (l *Location) firstZoneUsed() bool {
// lookupName returns information about the time zone with
// the given name (such as "EST") at the given pseudo-Unix time
// (what the given time of day would be in UTC).
func (l *Location) lookupName(name string, unix int64) (offset int, isDST bool, ok bool) {
func (l *Location) lookupName(name string, unix int64) (offset int, ok bool) {
l = l.get()
// First try for a zone with the right name that was actually
......@@ -235,9 +235,9 @@ func (l *Location) lookupName(name string, unix int64) (offset int, isDST bool,
for i := range l.zone {
zone := &l.zone[i]
if zone.name == name {
nam, offset, isDST, _, _ := l.lookup(unix - int64(zone.offset))
nam, offset, _, _, _ := l.lookup(unix - int64(zone.offset))
if nam == zone.name {
return offset, isDST, true
return offset, true
}
}
}
......@@ -246,7 +246,7 @@ func (l *Location) lookupName(name string, unix int64) (offset int, isDST bool,
for i := range l.zone {
zone := &l.zone[i]
if zone.name == name {
return zone.offset, zone.isDST, true
return zone.offset, true
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment