forked from Proxmox/proxmox
191299605f
Previously we displayed, e.g., "4m 1h 1min", i.e. using "m" for months and "min" for minutes but "m" was not accepted as month when parsing a timespan string, so a 4 month timespan would be printed "4m" but if parsed again it would result in a timespan of 4 minutes. So switch month to an uppercase "M" and minute to the lower case "m", which makes renderings of common timespans nicer, as in most of our use cases they are in the range of minutes to hours, sometimes days but seldom longer than weeks. So using single letters for all but "min" stuck out quite a bit, e.g.: "1h 5min 2s" looks odd compared to "1h 5m 1s" While the duplicate letter is not 100% ideal it's still better than the status quo, where rendering and parsing would interpret things differently. Also, the order still makes it quite clear, e.g.: "7m 2w 3d 1h 5min 44s" now becomes "7M 2w 3d 1h 5m 44s" As a side effect this also brings the display format closer to what is used inside PVE backup job taks logs. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
---|---|---|
.. | ||
debian | ||
src | ||
Cargo.toml |