Blog attempt 5
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

log date errors

+8 -1
+8 -1
src/post.rs
··· 304 304 305 305 306 306 fn parse_date(datestring: String) -> chrono::DateTime<FixedOffset> { 307 - chrono::DateTime::parse_from_rfc3339(&datestring).unwrap_or(chrono::DateTime::UNIX_EPOCH.into()) 307 + match chrono::DateTime::parse_from_rfc3339(&datestring) { 308 + Ok(dt) => dt, 309 + Err(e) => { 310 + println!("Dt parse error: {e}. String: {datestring}. Falling back to UNIX_EPOCH."); 311 + 312 + chrono::DateTime::UNIX_EPOCH.into() 313 + } 314 + } 308 315 } 309 316 310 317 #[handler]