atom: add posted date
This commit is contained in:
parent
e4a316327f
commit
7d5d62efba
|
@ -62,13 +62,14 @@ impl Into<atom::Entry> for Post {
|
|||
link.href = format!("https://christine.website/{}", self.link);
|
||||
result.links(vec![link]);
|
||||
result.content(content);
|
||||
// result.published(Some(
|
||||
// DateTime::<Utc>::from_utc(
|
||||
// NaiveDateTime::new(self.date, NaiveTime::from_hms(0, 0, 0)),
|
||||
// Utc,
|
||||
// )
|
||||
// .with_timezone(&Utc),
|
||||
// ));
|
||||
result.published(Some(
|
||||
DateTime::<Utc>::from_utc(
|
||||
NaiveDateTime::new(self.date, NaiveTime::from_hms(0, 0, 0)),
|
||||
Utc,
|
||||
)
|
||||
.with_timezone(&Utc)
|
||||
.into(),
|
||||
));
|
||||
|
||||
result.build().unwrap()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue