src/backup/datastore.rs: use unix epoch to create DateTime

To make sure that we have a timestamp without nanosecond.
This commit is contained in:
Dietmar Maurer
2019-03-04 17:58:22 +01:00
parent 38f8815925
commit 875fb1c01a
4 changed files with 11 additions and 14 deletions

View File

@ -6,7 +6,7 @@ use crate::api_schema::router::*;
//use crate::server::rest::*;
use serde_json::{json, Value};
use std::collections::{HashSet, HashMap};
use chrono::{DateTime, Datelike, Local, TimeZone};
use chrono::{DateTime, Datelike, Local};
use std::path::PathBuf;
use std::sync::Arc;
@ -97,7 +97,6 @@ fn delete_snapshots (
let backup_type = tools::required_string_param(&param, "backup-type")?;
let backup_id = tools::required_string_param(&param, "backup-id")?;
let backup_time = tools::required_integer_param(&param, "backup-time")?;
let backup_time = Local.timestamp(backup_time, 0);
let snapshot = BackupDir::new(BackupGroup::new(backup_type, backup_id), backup_time);