update to first proxmox crate split

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2021-10-08 11:19:37 +02:00
parent e3f3359c86
commit 6ef1b649d9
265 changed files with 880 additions and 1036 deletions

View File

@ -30,14 +30,8 @@ use anyhow::{bail, Error};
use serde::{Serialize, Deserialize};
use serde_json::json;
use proxmox::tools::{
Uuid,
fs::{
replace_file,
file_get_json,
CreateOptions,
},
};
use proxmox::tools::fs::{replace_file, file_get_json, CreateOptions};
use proxmox_uuid::Uuid;
use proxmox_systemd::time::compute_next_event;
use pbs_config::BackupLockGuard;
@ -571,7 +565,7 @@ impl Inventory {
if let Some(ctime) = self.media_set_start_time(media_set_uuid) {
let mut template = template.unwrap_or_else(|| String::from("%c"));
template = template.replace("%id%", &media_set_uuid.to_string());
proxmox::tools::time::strftime_local(&template, ctime)
Ok(proxmox_time::strftime_local(&template, ctime)?)
} else {
// We don't know the set start time, so we cannot use the template
Ok(media_set_uuid.to_string())