fixup show hours while < 100

This commit is contained in:
Daniel Stenberg 2026-01-03 23:25:55 +01:00
parent 293035eb43
commit 5335d8d186
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 3 deletions

View file

@ -47,7 +47,7 @@ UNITTEST void time2str(char *r, size_t rsize, curl_off_t seconds)
return;
}
h = seconds / 3600;
if(h <= 23) {
if(h <= 99) {
curl_off_t m = (seconds - (h * 3600)) / 60;
if(h <= 9) {
curl_off_t s = (seconds - (h * 3600)) - (m * 60);

View file

@ -40,8 +40,8 @@ time2str
16383 - 4:33:03
32767 - 9:06:07
65535 - 18h 12m
131071 - 1d 12h
262143 - 3d 00h
131071 - 36h 24m
262143 - 72h 49m
524287 - 6d 01h
1048575 - 12d 03h
2097151 - 24d 06h