[pbs-devel] applied: [PATCH v3 proxmox] time: drop trailing space when not showing seconds at end

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Oct 18 14:12:11 CEST 2024


Am 17/10/2024 um 16:40 schrieb Christian Ebner:
> On 10/17/24 15:16, Thomas Lamprecht wrote:
>> applied this one, thanks!
>>
>> FYI: I found a bug within the Display code, months got printed with the
>> "m" unit, which is the unit for minutes. Besides fixing that I also made
>> it print "m" for minutes now to have more consistent unit variants (all
>> single letter) see the commit message for more details.
>>
>> I also added a basic module documentation to convey what the format is and
>> where it comes from and some basic unit tests, could be surely expanded
>> though.
> 
> Great! So should we maybe start to switch over time duration output in 
> the backup client logs to `TimeSpan`s display output?
> There are a few places where purely seconds are used.

Hmm, not sure if I would unconditionally recommend it, but could be fine
for most places.

Albeit, for things where humans are not the primary consumer it might be
good to allow controlling this, potentially a --no-human-output flag that
causes things like TimeSpan and HumanByte to print just second/byte numbers.
But it also seems like a lot of work to do if there isn't even someone
requesting that use case.




More information about the pbs-devel mailing list