Skip to content

Commit

Permalink
Fixed error when date is not parseable (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 authored Jan 18, 2024
1 parent 54f1035 commit b8b2ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/podcast_episode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl PodcastEpisode {

match &item.pub_date {
Some(date) => {
let date = DateTime::parse_from_rfc2822(date).expect("Error parsing date");
let date = DateTime::parse_from_rfc2822(date).unwrap_or(DateTime::from(Utc::now()));
inserted_date = date.to_rfc3339()
}
None => {}
Expand Down

0 comments on commit b8b2ffd

Please sign in to comment.