Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP Lease time notation (Timezone) wrong

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 2 Posters 5.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      adegans
      last edited by

      2.1-RELEASE (i386)
      built on Wed Sep 11 18:16:22 EDT 2013
      FreeBSD 8.3-RELEASE-p11

      My timezone is set correctly in General Setup.

      Whenever I enable the "Change DHCP display lease time from UTC to local time." option all times go wrong. When I disable it they're correct after restarting DHCPd. So the setting is backwards.

      Exactly as outlined in this (old) thread: http://forum.pfsense.org/index.php?topic=51580.0

      Can someone correct the description on the configuration panel for the next release? I bet it would save a few people (like me) a bit of confusion ;).

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        The bad behaviour in 2.1-RELEASE is actually:
        a) Box not checked -> do not adjust the times read from the lease file, the lease file now happens to contain time in local, so times display in local.
        b) Box checked -> local time zone offset is added to the time that is thought to be in UTC from the leases file, but actually is already local time. Effectively moving the time further away from UTC. e.g. time zone offset is +02:00 then if the lease file says 08:00, that is already in local time in the leases file, the UTC equivalent is really 06:00, but the code adds another +02:00 and reports 10:00.
        This pull request fixes the behaviour to match the description on the GUI: https://github.com/pfsense/pfsense/pull/864
        After fix:
        a) Box not checked -> local time is read from the leases file, time zone offset is subtracted to get UTC, UTC is displayed.
        b) Box is checked -> local time is read from the leases file and displayed as-is.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • A
          adegans
          last edited by

          Hmmm if I interpret your post correctly that would indeed fix it :)

          When will this go into a release? (estimate)

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            I posted in the Development forum to see what the plans are for 2.1.1, as I am interested myself anyway - http://forum.pfsense.org/index.php/topic,70508.0.html

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • A
              adegans
              last edited by

              Right, lets continue there :)

              Thanks for your replies so far.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.