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()