diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-03 05:27:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-03 05:27:36 +0000 |
commit | bd2e46c8255fad4e75e589b3286ead560e910b39 (patch) | |
tree | 4f194bdb2e9edcc69ef2ab0dfb4aab15ca259267 /libgo/go/time/time.go | |
parent | bed6238ce677ba18a672a58bc077cec6de47f8d3 (diff) | |
download | gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.zip gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.gz gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.bz2 |
libgo: Update to Go 1.0.3.
From-SVN: r192025
Diffstat (limited to 'libgo/go/time/time.go')
-rw-r--r-- | libgo/go/time/time.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/time/time.go b/libgo/go/time/time.go index 2461dac..d48ca0c 100644 --- a/libgo/go/time/time.go +++ b/libgo/go/time/time.go @@ -241,10 +241,10 @@ func (t Time) IsZero() bool { // It is called when computing a presentation property like Month or Hour. func (t Time) abs() uint64 { l := t.loc - if l == nil { - l = &utcLoc + // Avoid function calls when possible. + if l == nil || l == &localLoc { + l = l.get() } - // Avoid function call if we hit the local time cache. sec := t.sec + internalToUnix if l != &utcLoc { if l.cacheZone != nil && l.cacheStart <= sec && sec < l.cacheEnd { |