From 23049b638cfca71cc02e26cce26257565a99f8d1 Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Tue, 14 Jan 2020 01:30:32 +0100 Subject: [PATCH] WIP: Fix RSS issues (#720) * Add id field to RSS feed * Add published field to RSS feed --- src/routes/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 01822323..e2a37266 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -139,6 +139,10 @@ pub fn post_to_atom(post: Post, conn: &Connection) -> Entry { }) .collect::>(), ) + // Using RFC 4287 format, see https://tools.ietf.org/html/rfc4287#section-3.3 for dates + // eg: 2003-12-13T18:30:02Z (Z is here because there is no timezone support with the NaiveDateTime crate) + .published(post.creation_date.format("%Y-%m-%dT%H:%M:%SZ").to_string()) + .id(post.id.to_string()) .links(vec![LinkBuilder::default() .href(post.ap_url) .build()