diff --git a/src/provider/data.rs b/src/provider/data.rs index 24dbdf6ef..8c9516272 100644 --- a/src/provider/data.rs +++ b/src/provider/data.rs @@ -1969,4 +1969,4 @@ pub(crate) static PROVIDER_IDS: Lazy> = }); pub static PROVIDER_UPDATED: Lazy = - Lazy::new(|| chrono::NaiveDate::from_ymd(2023, 1, 6)); + Lazy::new(|| chrono::NaiveDate::from_ymd_opt(2023, 1, 6).unwrap()); diff --git a/src/provider/update.py b/src/provider/update.py index 9031e85b4..b67e9fb59 100755 --- a/src/provider/update.py +++ b/src/provider/update.py @@ -190,6 +190,6 @@ if __name__ == "__main__": now = datetime.datetime.utcnow() out_all += "pub static PROVIDER_UPDATED: Lazy = "\ - "Lazy::new(|| chrono::NaiveDate::from_ymd("+str(now.year)+", "+str(now.month)+", "+str(now.day)+"));\n" + "Lazy::new(|| chrono::NaiveDate::from_ymd_opt("+str(now.year)+", "+str(now.month)+", "+str(now.day)+").unwrap());\n" print(out_all)