From 110ceff08cf9f2c615b829c98f853f19b48a4a6e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 12 Sep 2020 15:10:47 +0200 Subject: [PATCH] avoid chrono dependency, depend on proxmox 0.3.8 - remove chrono dependency - depend on proxmox 0.3.8 - remove epoch_now, epoch_now_u64 and epoch_now_f64 - remove tm_editor (moved to proxmox crate) - use new helpers from proxmox 0.3.8 * epoch_i64 and epoch_f64 * parse_rfc3339 * epoch_to_rfc3339_utc * strftime_local - BackupDir changes: * store epoch and rfc3339 string instead of DateTime * backup_time_to_string now return a Result * remove unnecessary TryFrom<(BackupGroup, i64)> for BackupDir - DynamicIndexHeader: change ctime to i64 - FixedIndexHeader: change ctime to i64 --- src/rrd/cache.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rrd/cache.rs b/src/rrd/cache.rs index f08d6c9e..e5e3fe09 100644 --- a/src/rrd/cache.rs +++ b/src/rrd/cache.rs @@ -8,7 +8,6 @@ use lazy_static::lazy_static; use proxmox::tools::fs::{create_path, CreateOptions}; use crate::api2::types::{RRDMode, RRDTimeFrameResolution}; -use crate::tools::epoch_now_f64; use super::*; @@ -42,7 +41,7 @@ pub fn update_value(rel_path: &str, value: f64, dst: DST, save: bool) -> Result< std::fs::create_dir_all(path.parent().unwrap())?; let mut map = RRD_CACHE.write().unwrap(); - let now = epoch_now_f64()?; + let now = proxmox::tools::time::epoch_f64(); if let Some(rrd) = map.get_mut(rel_path) { rrd.update(now, value);