diff options
| author | 2026-03-25 14:49:17 +0000 | |
|---|---|---|
| committer | 2026-03-25 15:02:22 +0000 | |
| commit | 7847657e0820af98120031f719b8ede635ad8c07 (patch) | |
| tree | 8c4439c78f72f1382edc809b49be33115847b6e7 /object/signature/when.go | |
| parent | object: Remove type.go (diff) | |
| signature | No signature | |
object: Split each object type into its own package v0.1.108
Diffstat (limited to 'object/signature/when.go')
| -rw-r--r-- | object/signature/when.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/object/signature/when.go b/object/signature/when.go new file mode 100644 index 00000000..0a252f68 --- /dev/null +++ b/object/signature/when.go @@ -0,0 +1,10 @@ +package signature + +import "time" + +// When returns a time.Time with the signature's timezone offset. +func (signature Signature) When() time.Time { + loc := time.FixedZone("git", int(signature.OffsetMinutes)*60) + + return time.Unix(signature.WhenUnix, 0).In(loc) +} |
