]> git.proxmox.com Git - pve-guest-common.git/commitdiff
change replica log timestamp to a human readable format
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 20 Jun 2017 12:27:23 +0000 (14:27 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 22 Jun 2017 08:17:15 +0000 (10:17 +0200)
modeled after the timestamps in vm migration

this does not impact the regression tests, because they
overwrite 'get_log_time' anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/Replication.pm

index 0db427d6f5e44e96f917e0728ad0da402158d1c7..5a7274e79519a726642e9cef7c5483469de52cd5 100644 (file)
@@ -5,6 +5,7 @@ use strict;
 use Data::Dumper;
 use JSON;
 use Time::HiRes qw(gettimeofday tv_interval);
 use Data::Dumper;
 use JSON;
 use Time::HiRes qw(gettimeofday tv_interval);
+use POSIX qw(strftime);
 
 use PVE::INotify;
 use PVE::ProcFSTools;
 
 use PVE::INotify;
 use PVE::ProcFSTools;
@@ -19,7 +20,7 @@ use PVE::ReplicationState;
 # regression tests should overwrite this
 sub get_log_time {
 
 # regression tests should overwrite this
 sub get_log_time {
 
-    return time();
+    return strftime("%F %H:%M:%S", localtime);
 }
 
 # Find common base replication snapshot, available on local and remote side.
 }
 
 # Find common base replication snapshot, available on local and remote side.