DHCP leases time



  • Not sure if this is only for 2.2, but on 'Status' > 'DHCP leases' the start- and end time for the leases seem to be in UTC, not the timezone choosen in 'General Setup'.

    Could be that it's meant to be that way, although I wouldn't know why.

    2.2-ALPHA (amd64)
    built on Mon Apr 28 16:52:25 CDT 201

    Richard



  • The default is to display lease times in UTC. On DHCP Server setting page, check:
    Change DHCP display lease time from UTC to local time.
    and you get local time shown.
    I just checked on 2.2 and it works. There was some time in the past on 2.?.? when this did not work quite as expected. I don't remember exactly, but maybe it used to do the opposite of what the checkbox said. Anyway, nowadays it does what it says.

    Note: If you have multiple LANs with DHCP, and check that box for any of them, then ALL the leases are displayed in local time. It is not really an interface-specific setting. I guess that behavior is a "feature".



  • Ah, thanks, I overlooked that setting.

    Still a bit puzzled why it is there in the first place. Why wouldn't you want to always display the DHCP lease time in local time? When displaying in UTC you just have to do the calculation yourself.

    Or am I missing something?

    Anyway thanks, for solving this!

    Richard



  • @NeverSimple:

    Still a bit puzzled why it is there in the first place. Why wouldn't you want to always display the DHCP lease time in local time? When displaying in UTC you just have to do the calculation yourself.

    Or am I missing something?

    Local time could be confusing if you have clients in different time zones, or if you are remotely managing a firewall that's in a different time zone?



  • @charliem:

    Local time could be confusing if you have clients in different time zones, or if you are remotely managing a firewall that's in a different time zone?

    Could be, but the log files seem to display in local time as does the dashboard. I don't know what would be more confusing?
    But this is maybe getting a bit of topic, not much to do with 2.2 snapshots, I guess… it's not a big deal anyway, just curious.

    Richard



  • That's because ISC dhcpd always stores its leases file with UTC times only. We used to show them in UTC only as well, that checkbox is a newer addition to show them in your local time.



  • And a fine addition it is…  :) . It just makes things clearer when all times in the GUI refer to the same time(zone), I think.


Log in to reply