Fix provider update script

This commit is contained in:
link2xt
2023-01-06 00:44:15 +00:00
parent 10349b7be4
commit 3986bb6c4e
2 changed files with 2 additions and 2 deletions

View File

@@ -1969,4 +1969,4 @@ pub(crate) static PROVIDER_IDS: Lazy<HashMap<&'static str, &'static Provider>> =
});
pub static PROVIDER_UPDATED: Lazy<chrono::NaiveDate> =
Lazy::new(|| chrono::NaiveDate::from_ymd(2023, 1, 6));
Lazy::new(|| chrono::NaiveDate::from_ymd_opt(2023, 1, 6).unwrap());

View File

@@ -190,6 +190,6 @@ if __name__ == "__main__":
now = datetime.datetime.utcnow()
out_all += "pub static PROVIDER_UPDATED: Lazy<chrono::NaiveDate> = "\
"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)