aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicwoj92 <45581170+micwoj92@users.noreply.github.com>2023-03-21 22:20:21 +0100
committerGitHub <noreply@github.com>2023-03-21 22:20:21 +0100
commit713bce5769d604257684438ea59690bf7678818a (patch)
tree6ed2fcd1af7f41df420dcdab97a0d6bb2e83dfb2
parentb65438a2762ea7447caa66f646f3609d99dc58d1 (diff)
downloadRSS-watcher-713bce5769d604257684438ea59690bf7678818a.tar.gz
RSS-watcher-713bce5769d604257684438ea59690bf7678818a.zip
Fix deprecation warning
Chrono 0.4.23 deprecated methods that have an _opt() alternative.
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d4f7f1e..a523b4c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -23,7 +23,7 @@ async fn get_feed(feed_conf: &FeedConf) -> bool {
let last_fetch_time;
match &feed_conf.last_fetch {
Some(x) => last_fetch_time = DateTime::from_utc(
- NaiveDateTime::from_timestamp(x.to_owned(),0), Utc),
+ NaiveDateTime::from_timestamp_opt(x.to_owned(),0).unwrap(), Utc),
None => last_fetch_time = Utc::now(),
}
debug!("Using last_fetch_time {:?}", last_fetch_time.to_owned());