Fix newTimestampFromTime panic on extreme dates (closes #15) (#20)

Co-authored-by: clawbot <clawbot@openclaw>
Co-authored-by: Jeffrey Paul <sneak@noreply.example.org>
Reviewed-on: #20
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
This commit was merged in pull request #20.
Цей коміт міститься в:
2026-02-09 02:10:21 +01:00
зафіксовано sneak
co-authored by clawbot sneak
джерело 04b05e01e8
коміт 70af055d4e
2 змінених файлів з 25 додано та 3 видалено
+2 -3
Переглянути файл
@@ -16,11 +16,10 @@ import (
const MAGIC string = "ZNAVSRFG"
func newTimestampFromTime(t time.Time) *Timestamp {
out := &Timestamp{
return &Timestamp{
Seconds: t.Unix(),
Nanos: int32(t.UnixNano() - (t.Unix() * 1000000000)),
Nanos: int32(t.Nanosecond()),
}
return out
}
func (m *manifest) generate() error {