Merge pull request #123 from Portabase/fix/backup-creation-timezone

fix: backup-creation-timezone
This commit is contained in:
Charles Gauthereau
2026-10-17 19:39:41 +02:00
committed by GitHub
+1 -2
View File
@@ -1,7 +1,6 @@
#![allow(dead_code)]
use anyhow::Result;
use chrono::Utc;
use serde::{Deserialize, Serialize};
use std::path::{Path, PathBuf};
use tokio::fs::File;
@@ -54,7 +53,7 @@ pub fn full_file_path(file_name: &String, folder_name: Option<&str>) -> String {
.filter(|folder_name| !folder_name.is_empty())
.unwrap_or("backups");
format!("{}/{}/{}", folder_name, Utc::now().format("%Y-%m-%d"), file_name)
format!("{}/{}/{}", folder_name, chrono::Local::now().format("%Y-%m-%d"), file_name)
}
const CHUNK_SIZE: usize = 16 * 1024 * 1024;