mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
Don't use deprecated chrono functions
This commit is contained in:
@@ -478,7 +478,8 @@ async fn import_backup(
|
||||
/// it can be renamed to dest_path. This guarantees that the backup is complete.
|
||||
fn get_next_backup_path(folder: &Path, backup_time: i64) -> Result<(PathBuf, PathBuf, PathBuf)> {
|
||||
let folder = PathBuf::from(folder);
|
||||
let stem = chrono::NaiveDateTime::from_timestamp(backup_time, 0)
|
||||
let stem = chrono::NaiveDateTime::from_timestamp_opt(backup_time, 0)
|
||||
.context("can't get next backup path")?
|
||||
// Don't change this file name format, in `dc_imex_has_backup` we use string comparison to determine which backup is newer:
|
||||
.format("delta-chat-backup-%Y-%m-%d")
|
||||
.to_string();
|
||||
|
||||
Reference in New Issue
Block a user