DHCP Start/End times shown in wrong timezone

  • On the "status_dhcp_leases.php" page, there is a column for Start and a column for End.  I see a Start time for "2014/10/14 17:39:42" even though it's currently only 2014/10/14 14:23:00.  I think the times should be shown in the timezone that is selected on system.php.

  • There is a checkbox on the DHCP Server settings (and also one on DHCPv6 server settings, if applicable) that allows you to Change DHCP display lease time from UTC to local time. This should fix it so that it displays in your local timezone instead of UTC.

  • Great, thanks.  That fixed the problem.

    I believe that box is unchecked by default.  Maybe it should be checked by default?

    I checked that box on my OPT1 interface.  I see that it says "This will be used for all DHCP interfaces lease time."  Does that mean it also applies to my LAN interface even though the checkbox is still unchecked on that tab?  If so, maybe when the user checks the box on one interface, the UI should automatically show the boxes checked on all the interfaces.

  • I have been annoyed by this also. So I have made the code display the setting of dhcpleaseinlocaltime based on if it is checked in any interface tab. Then when saving write it to all DHCP interface settings (so that when the user turns it off, it goes off on all tabs, and thus really goes off).

    Pull request: https://github.com/pfsense/pfsense/pull/1311

  • Thanks, Phil.

    What if we moved the checkbox from the DHCP Server settings page to the DHCP Leases page?  It's not really a DHCP Server setting, but a DHCP Lease display setting.  Moving it would eliminate confusion by putting the global setting in only one place, and it would make it very easy to find since it's on the same page it affects.  To make it work for DHCPv4 and v6, we'd either need two global settings or use your idea for two checkboxes that link to one setting.

    I'm just trying to think of how to make it easiest for everyone, including new users.

Log in to reply