diff --git a/src/user.rs b/src/user.rs index 50a4daa..9ddbc04 100644 --- a/src/user.rs +++ b/src/user.rs @@ -8,6 +8,7 @@ use crate::{config, utils}; use hyper::{Body, Request, Response}; use rinja::Template; use time::{macros::format_description, OffsetDateTime}; +use chrono::DateTime; // STRUCTS #[derive(Template)] @@ -165,6 +166,7 @@ pub async fn rss(req: Request) -> Result, String> { title: Some(post.title.to_string()), link: Some(utils::get_post_url(&post)), author: Some(post.author.name), + pub_date: Some(DateTime::from_timestamp(post.created_ts as i64, 0).unwrap_or_default().to_rfc2822()), content: Some(rewrite_urls(&post.body)), ..Default::default() })