From 22559929f93928274b91f705c0e3f1a11a691539 Mon Sep 17 00:00:00 2001 From: ijqq Date: Thu, 28 Mar 2024 08:30:02 +0000 Subject: [PATCH] Replace deprecated method `chrono::NaiveDateTime::timestamp_millis` (#3097) * Replace deprecated method `chrono::NaiveDateTime::timestamp_millis` * Update CONTRIBUTORS --- CONTRIBUTORS | 1 + rslib/src/scheduler/fsrs/weights.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3093b6a20..a5193b47a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -167,6 +167,7 @@ Foxy_null Arbyste Vasll laalsaas +ijqq ******************** The text of the 3 clause BSD license follows: diff --git a/rslib/src/scheduler/fsrs/weights.rs b/rslib/src/scheduler/fsrs/weights.rs index 28f586a05..38fb6e1ad 100644 --- a/rslib/src/scheduler/fsrs/weights.rs +++ b/rslib/src/scheduler/fsrs/weights.rs @@ -36,6 +36,7 @@ fn ignore_revlogs_before_date_to_ms( s => NaiveDate::parse_from_str(s.as_str(), "%Y-%m-%d") .or_else(|err| invalid_input!(err, "Error parsing date: {s}"))? .and_time(NaiveTime::from_hms_milli_opt(0, 0, 0, 0).unwrap()) + .and_utc() .timestamp_millis(), } .into())