Page MenuHomeVyOS Platform

Sort order for remaining time in dhcp server lease should be by timedelta, not lexical
Closed, ResolvedPublicBUG

Description

show dhcp server leases sort remaining sorts the result by lexical order of remainig time, and not by actual timedelta.

Current output:

IP Address     MAC address        State    Lease start                Lease expiration           Remaining    Pool    Hostname            Origin
-------------  -----------------  -------  -------------------------  -------------------------  -----------  ------  ------------------  --------
192.168.28.82   aa:bb:50:e4:84:xx  active   2026-04-13 16:32:29+00:00  2026-04-14 16:32:29+00:00  12:36:50     FOO     redacted            local
192.168.17.1    aa:bb:c6:ad:f4:xx  active   2026-04-13 17:02:50+00:00  2026-04-14 17:02:50+00:00  13:07:11     FOO     redacted            local
192.168.19.200  aa:bb:f9:c6:28:xx  active   2026-04-13 17:02:57+00:00  2026-04-14 17:02:57+00:00  13:07:18     FOO     redacted            local
192.168.17.9    aa:bb:4e:ca:35:xx  active   2026-04-14 02:13:24+00:00  2026-04-15 02:13:24+00:00  22:17:45     FOO     redacted            local
192.168.60.11   aa:bb:d4:7d:57:xx  active   2026-04-13 22:47:09+00:00  2026-04-14 06:47:09+00:00  2:51:30      FOO     redacted            local
192.168.44.4    aa:bb:5c:a8:1c:xx  active   2026-04-13 23:28:36+00:00  2026-04-14 07:28:36+00:00  3:32:57      FOO     redacted            local
192.168.44.86   aa:bb:03:55:a4:xx  active   2026-04-13 23:43:10+00:00  2026-04-14 07:43:10+00:00  3:47:31      FOO     redacted            local
192.168.44.91   aa:bb:85:dd:3b:xx  active   2026-04-13 23:59:27+00:00  2026-04-14 07:59:27+00:00  4:03:48      FOO     redacted            local
192.168.44.89   aa:bb:85:dd:3b:xx  active   2026-04-14 00:15:21+00:00  2026-04-14 08:15:21+00:00  4:19:42      FOO     redacted            local

Expected output:

IP Address     MAC address        State    Lease start                Lease expiration           Remaining    Pool    Hostname            Origin
-------------  -----------------  -------  -------------------------  -------------------------  -----------  ------  ------------------  --------
192.168.60.11   aa:bb:d4:7d:57:xx  active   2026-04-13 22:47:09+00:00  2026-04-14 06:47:09+00:00  2:51:30      FOO     redacted            local
192.168.44.4    aa:bb:5c:a8:1c:xx  active   2026-04-13 23:28:36+00:00  2026-04-14 07:28:36+00:00  3:32:57      FOO     redacted            local
192.168.44.86   aa:bb:03:55:a4:xx  active   2026-04-13 23:43:10+00:00  2026-04-14 07:43:10+00:00  3:47:31      FOO     redacted            local
192.168.44.91   aa:bb:85:dd:3b:xx  active   2026-04-13 23:59:27+00:00  2026-04-14 07:59:27+00:00  4:03:48      FOO     redacted            local
192.168.44.89   aa:bb:85:dd:3b:xx  active   2026-04-14 00:15:21+00:00  2026-04-14 08:15:21+00:00  4:19:42      FOO     redacted            local
192.168.28.82   aa:bb:50:e4:84:xx  active   2026-04-13 16:32:29+00:00  2026-04-14 16:32:29+00:00  12:36:50     FOO     redacted            local
192.168.17.1    aa:bb:c6:ad:f4:xx  active   2026-04-13 17:02:50+00:00  2026-04-14 17:02:50+00:00  13:07:11     FOO     redacted            local
192.168.19.200  aa:bb:f9:c6:28:xx  active   2026-04-13 17:02:57+00:00  2026-04-14 17:02:57+00:00  13:07:18     FOO     redacted            local
192.168.17.9    aa:bb:4e:ca:35:xx  active   2026-04-14 02:13:24+00:00  2026-04-15 02:13:24+00:00  22:17:45     FOO     redacted            local

Details

Version
1.5
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)