Change atom.xml date format
This commit is contained in:
parent
d4ce20c0be
commit
20f85d7e72
|
@ -178,9 +178,10 @@ impl GemfeedEntry {
|
||||||
|
|
||||||
pub fn from_atom(entry: &AtomEntry) -> Option<GemfeedEntry> {
|
pub fn from_atom(entry: &AtomEntry) -> Option<GemfeedEntry> {
|
||||||
let link = GemfeedLink::try_from(entry).ok()?;
|
let link = GemfeedLink::try_from(entry).ok()?;
|
||||||
|
|
||||||
let publish_date = link
|
let publish_date = link
|
||||||
.published
|
.published
|
||||||
.map(|date| DateTime::parse_from_rfc3339(&date))?
|
.map(|date| DateTime::parse_from_str(&date, "%Y-%m-%d %H:%M:%S %:z"))?
|
||||||
.ok()?
|
.ok()?
|
||||||
.to_utc();
|
.to_utc();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue