summaryrefslogtreecommitdiff
path: root/src/pkg/time/time.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/time/time.go')
-rw-r--r--src/pkg/time/time.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pkg/time/time.go b/src/pkg/time/time.go
index ea9b66cbc..3d69d9991 100644
--- a/src/pkg/time/time.go
+++ b/src/pkg/time/time.go
@@ -159,10 +159,7 @@ func UTC() *Time {
// SecondsToLocalTime converts sec, in number of seconds since the Unix epoch,
// into a parsed Time value in the local time zone.
func SecondsToLocalTime(sec int64) *Time {
- z, offset, err := time.lookupTimezone(sec);
- if err != nil {
- return SecondsToUTC(sec)
- }
+ z, offset := time.lookupTimezone(sec);
t := SecondsToUTC(sec+int64(offset));
t.Zone = z;
t.ZoneOffset = offset;