From 7a6cfbd98d19a80deaabedf0198e3f4fbfee8761 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 26 Jul 2019 11:11:55 +0200 Subject: [PATCH] src/bin/proxmox-backup-client.rs: correctly compute duration And format time with SecondsFormat::Secs --- src/bin/proxmox-backup-client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 5d3f87a4..1ac40a16 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -523,7 +523,7 @@ fn create_backup( let start_time = Local::now(); - println!("Starting protocol: {}", start_time.to_rfc3339()); + println!("Starting protocol: {}", start_time.to_rfc3339_opts(chrono::SecondsFormat::Secs, false)); let (crypt_config, rsa_encrypted_key) = match keyfile { None => (None, None), @@ -601,11 +601,11 @@ fn create_backup( client.finish().wait()?; - let end_time = Local.timestamp(Local::now().timestamp(), 0); + let end_time = Local::now(); let elapsed = end_time.signed_duration_since(start_time); println!("Duration: {}", elapsed); - println!("End Time: {}", end_time.to_rfc3339()); + println!("End Time: {}", end_time.to_rfc3339_opts(chrono::SecondsFormat::Secs, false)); Ok(Value::Null) }