[Koha-bugs] [Bug 27048] Add timestamps to verbose output of rebuild_zebra.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 18 16:13:47 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27048

--- Comment #7 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to David Cook from comment #3)
> Comment on attachment 113780 [details] [review]
> Bug 27048: Add basic timekeeping to rebuild_zebra
> 
> Review of attachment 113780 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: misc/migration_tools/rebuild_zebra.pl
> @@ +848,5 @@
> > +    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]";
> > +
> > +    return "$now_pretty $elapsed_pretty";
> > +}
> 
> Why not just use DateTime->now()->strftime("%H:%M:%S")?

No major reason for using POSIX.. mostly I was avoiding more DateTime use.. but
as it's a single call it's not terrible so can be swapped if needed.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list