From 7d5d62efbacd3343f1329cdeca23f0251224cc31 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 14 Jul 2020 16:09:26 -0400 Subject: [PATCH] atom: add posted date --- src/post/mod.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/post/mod.rs b/src/post/mod.rs index 02b8c69..ebe1be3 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -62,13 +62,14 @@ impl Into for Post { link.href = format!("https://christine.website/{}", self.link); result.links(vec![link]); result.content(content); - // result.published(Some( - // DateTime::::from_utc( - // NaiveDateTime::new(self.date, NaiveTime::from_hms(0, 0, 0)), - // Utc, - // ) - // .with_timezone(&Utc), - // )); + result.published(Some( + DateTime::::from_utc( + NaiveDateTime::new(self.date, NaiveTime::from_hms(0, 0, 0)), + Utc, + ) + .with_timezone(&Utc) + .into(), + )); result.build().unwrap() }