From 193bbca28ce40ad4390a0c2c7b8b025cc392f2d4 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Mon, 6 Sep 2021 22:48:39 +0300 Subject: [PATCH] Added correct time format for podcast. --- src/templates/src/podcast.xml | 2 +- src/templates/templates.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/templates/src/podcast.xml b/src/templates/src/podcast.xml index 45e5cba0..3bcf8617 100644 --- a/src/templates/src/podcast.xml +++ b/src/templates/src/podcast.xml @@ -23,7 +23,7 @@ {{ .EpisodeNumber }} {{ .EpisodeNumber }} - {{ .PublicationDate }} + {{ rfc1123 .PublicationDate }} {{ .Duration }} {{ .Url }} diff --git a/src/templates/templates.go b/src/templates/templates.go index 7de7face..9e6f1e43 100644 --- a/src/templates/templates.go +++ b/src/templates/templates.go @@ -117,6 +117,9 @@ var HMNTemplateFuncs = template.FuncMap{ "rfc3339": func(t time.Time) string { return t.UTC().Format(time.RFC3339) }, + "rfc1123": func(t time.Time) string { + return t.UTC().Format(time.RFC1123) + }, "alpha": func(alpha float64, color noire.Color) noire.Color { color.Alpha = alpha return color