1.5 rolling DHCP lease start/exp times?

With 1.5 rolling, I am seeing DHCP server lease start times 5 hours earlier than the actual time the client connected.

Here’s an example - the router was updated to VyOS 1.5-rolling-202501260007 and rebooted at roughly 7:22 AM EST. The client’s new DHCP lease shows as starting 5 hours earlier, at 2:22 AM EST (MAC address obfuscated):

> vyos@vyos:~$ show dhcp server leases
> IP Address    MAC address        State    Lease start          Lease expiration     Remaining    Pool    Hostname    Origin
> ------------  -----------------  -------  -------------------  -------------------  -----------  ------  ----------  --------
> 192.168.0.11  00:00:00:00:00:00  active   2025/01/26 02:22:29  2025/01/27 02:22:29  23:58:35     LAN1    hpi5xu      local
> vyos@vyos:~$ show date
> Sun Jan 26 07:24:00 AM EST 2025

Other subsequent clients will also show DHCP leases starting 5 hours before their actual connect time.

My assumption is there’s a bug in the code showing the lease times. This could happen if the code assumes the router’s hardware clock is set to UTC when it’s actually set to local time (in my case, EST, which is 5 hours earlier than UTC). But I’m guessing.

This did not happen with 1.4epa1 (the last 1.4 I could build on my own). With that build, DHCP server lease times displayed consistent with the router’s time.

Hi @gus, Possible to give this a try?

Thanks for the quick follow-up. I’m not sure how to actually try the fix (I’m an end user, not a developer). But looking at the writeup for T6998, it isn’t clear that it fixes the issue I see. The smoketest result you show for T6998 looks like it reformats the output text to include the timezone offset, but there’s no indication it fixes what I see - the displayed lease start time is wrong.

My issue is that the “show dhcp server leases” shows leases that start too early - I see a start time even before when the router (and client) are first booted. The error is the number of hours my time zone is behind UTC (in my case, start time is 5 hours too soon). Take a look again at the output I posted above. I cold booted my router and client at about 07:20 EST (UTC-5:00), but the router says the lease my client picked up started at 02:22:29. It looks to me like the code that either sets or displays the lease times is getting the timezone offset confused.

The latest rolling release has the necessary fix applied. Can you please try upgrading and verify?

Yes, that fixed it. I upgraded and rebooted, and now see this:

vyos@vyos:~$ show date
Wed Jan 29 07:56:06 PM EST 2025
vyos@vyos:~$ show dhcp server leases
IP Address    MAC address        State    Lease start                Lease expiration           Remaining    Pool    Hostname    Origin
------------  -----------------  -------  -------------------------  -------------------------  -----------  ------  ----------  --------
192.168.0.11  00:00:00:00:00:00  active   2025-01-30 00:55:22+00:00  2025-01-31 00:55:22+00:00  23:59:02     LAN1    hpi5xu      local
vyos@vyos:~$

The lease start times are now showing correctly (as UTC, which is 5 hours ahead of my local time EST). As a feature request, it’d be great to be able to choose whether the times are displayed UTC or local.

Again, thanks!