fix: Parse RFC 3339 timestamps for feed pubDate #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/feed-pubdate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
feed.PubDatenow tries both timestamp shapes: raw SQLiteCURRENT_TIMESTAMPtext (2006-01-02 15:04:05) and RFC 3339 (RFC3339Nano), normalizing to RFC-1123ZTestPubDatecovering both layouts, fractional seconds, and numeric offsetsWhy
Every feed item rendered with the same pubDate = render time. The sqlite driver (modernc.org/sqlite) returns
DATETIMEcolumns astime.Time, anddatabase/sqlrenders that as RFC 3339 when scanned into a string — which the old single-layout parse rejected, so every item fell back totime.Now().Related
episodes.created_atthrough the driver yieldsdriver.Valueof typetime.Time