Navigation

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

    How to address Schedule trouble at 23:59?

    General pfSense Questions
    2
    5
    1296
    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.
    • M
      MikeGreer2000 last edited by

      Good day all, I'm trying to figure out how to deal with the fact the schedule option will not allow me to address the last minute of the day.  I have been able to use the scheduling successfully but anytime a schedule crosses midnight there is trouble because I can't set any schedule that includes the minute 23:59.

      Anyone been able to come up with a fix?  I thought about trying to manually edit the xml file that contains the schedules but I'm still not able to address that last minute of the day.

      Any thoughts would be much appreciated!

      1 Reply Last reply Reply Quote 0
      • marcelloc
        marcelloc last edited by

        at least on gui, it show schedule with last minute with this fix on /etc/inc/filter.inc:

        at line 2661 change code from:

        $starting_time = strtotime($tmp[0]);
        $ending_time = strtotime($tmp[1]);
        

        to

        $starting_time = strtotime($tmp[0].":00");
        $ending_time = strtotime($tmp[1].":59");
        

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • M
          MikeGreer2000 last edited by

          Thanks but I was hoping for more than a cosmetic fix.  I wanted to set a rule to allow access until 1:00am but could not figure out how to do it because at 11:59 the schedule would expire until 00:00 when the next schedule kicked in.

          The way I ended up making it work is kind of hokey but it works.  I just set the time zone back one time zone and adjusted the schedules so they ended at 11:59 – which is really 12:59am in my real time zone.

          Hopefully I’m not just missing something and the scheduling across midnight can addressed in future releases.

          1 Reply Last reply Reply Quote 0
          • marcelloc
            marcelloc last edited by

            it's not a cosmetic fix.
            a schedule from 10:00pm to 01:00 should be splited in two time ranges.
            from 10:00. to 11:59 and from 00:00 to 01:00

            the fix will include latest minute from both time ranges.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • M
              MikeGreer2000 last edited by

              Sorry, I misunderstood.  I’ll try it again maybe I didn’t get it right – the connection was still dropped just before midnight when I tested it.

              Certainly worth another try – thanks for your help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post