From 3fcce0302f30248f46b11aeb82b34baf2c775a8b Mon Sep 17 00:00:00 2001 From: june Date: Wed, 1 Jul 2026 15:56:10 +0200 Subject: [PATCH] appview/pages: format unix epoch explicitly purely decorative change to format timestamps equal to the unix epoch (1970-01-01T00:00:00Z) as "at the beginning of time" --- appview/pages/funcmap.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appview/pages/funcmap.go b/appview/pages/funcmap.go index 47cfb684..f43e6e43 100644 --- a/appview/pages/funcmap.go +++ b/appview/pages/funcmap.go @@ -223,6 +223,9 @@ func (p *Pages) funcMap() template.FuncMap { "plural": english.Plural, "relTimeFmt": humanize.Time, "shortRelTimeFmt": func(t time.Time) string { + if t.Unix() == 0 { + return "at the beginning of time" + } return humanize.CustomRelTime(t, time.Now(), "", "", []humanize.RelTimeMagnitude{ {D: time.Second, Format: "now", DivBy: time.Second}, {D: 2 * time.Second, Format: "1s %s", DivBy: 1}, -- 2.51.2