aboutsummaryrefslogtreecommitdiffstats
path: root/objects.go
diff options
context:
space:
mode:
Diffstat (limited to 'objects.go')
-rw-r--r--objects.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/objects.go b/objects.go
index 351a022..9397bc8 100644
--- a/objects.go
+++ b/objects.go
@@ -76,7 +76,15 @@ func (s *Signature) Decode(b []byte) {
if c == ' ' || end {
t, err := strconv.ParseInt(string(b[from:i]), 10, 64)
if err == nil {
- s.When = time.Unix(t, 0)
+ loc := time.UTC
+ ts := time.Unix(t, 0)
+ if len(b[i:]) >= 6 {
+ tl, err := time.Parse(" -0700", string(b[i:i+6]))
+ if err == nil {
+ loc = tl.Location()
+ }
+ }
+ s.When = ts.In(loc)
}
end = true
}