fix compilation warnings #959

Merged
lx merged 5 commits from fixes into main 2025-02-14 17:32:31 +00:00
Showing only changes of commit 5b26545abf - Show all commits

View file

@ -395,13 +395,13 @@ fn midnight_ts(date: NaiveDate, use_local_tz: bool) -> u64 {
.expect("bad local midnight")
.timestamp_millis() as u64;
}
midnight.timestamp_millis() as u64
midnight.and_utc().timestamp_millis() as u64
}
fn next_date(ts: u64) -> NaiveDate {
NaiveDateTime::from_timestamp_millis(ts as i64)
DateTime::<Utc>::from_timestamp_millis(ts as i64)
.expect("bad timestamp")
.date()
.date_naive()
.succ_opt()
.expect("no next day")
}