From 6a3ce37d11ae6215b879c2da5c5d2dc204ec6dbc Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 1 Mar 2021 14:00:39 +0000 Subject: [PATCH] Bug 27048: (follow-up) Correction to elapsed printing --- misc/migration_tools/rebuild_zebra.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index 8fd611a83b..a6ecd695ba 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -842,11 +842,9 @@ sub pretty_time { $m = $_ % 60; $_ /= 60; $h = $_ % 24; - $_ /= 24; - $d = $_; my $now_pretty = POSIX::strftime("%H:%M:%S",localtime($now)); - my $elapsed_pretty = $d ? "[$d:$h:$m:$s]" : $h ? "[$h:$m:$s]" : $m ? "[$m:$s]" : "[$s]"; + my $elapsed_pretty = sprintf "[%02d:%02d:%02d]",$h,$m,$s; return "$now_pretty $elapsed_pretty"; } -- 2.20.1