correct for UT tz
Jes Olson j3s@c3f.net
Mon, 29 Jun 2026 18:53:37 -0500
2 files changed,
9 insertions(+),
0 deletions(-)
M
rss/time.go
→
rss/time.go
@@ -79,6 +79,12 @@
func parseTime(s string) (time.Time, error) { s = strings.TrimSpace(s) + // "UT" is a valid RFC 822 timezone alias for UTC, but Go's time package + // doesn't recognize it. Normalize it to "UTC" before parsing. + if strings.HasSuffix(s, " UT") { + s = s[:len(s)-2] + "UTC" + } + var e error var t time.Time
M
rss/time_test.go
→
rss/time_test.go
@@ -100,6 +100,9 @@ time.Date(2009, 9, 6, 14, 18, 0, 0, time.UTC),
}, { "Sun, 06 Sep 2009 16:18:00 +0200", time.Date(2009, 9, 6, 14, 18, 0, 0, time.UTC), + }, { + "14 Jun 2026 00:00:00 UT", + time.Date(2026, 6, 14, 0, 0, 0, 0, time.UTC), }} for _, c := range tests {