Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-19937

Wrong date shown when testing calendar linked time condition

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Not an issue
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: Time Conditions
    • Labels:
      None
    • ToDo:
    • Asterisk Version:
      13.22.0
    • Distro Version:
      14
    • Distro:
      FreePBX Distro

      Description

      This is probably just a "cosmetic" issue, that is why I selected "Improvement" as issue type, but it would be very helpful to fix it in order to avoid confusion.

      When testing calendar linked time conditions status with the schedtc.php script, the wrong date is shown for "is now / is not now " time.
      For example, I have an event for day May 7 2019 from 7am to 8am and if I run /var/lib/asterisk/bin/schedtc.php --debug, the date shown for "is now" is May 8 2019 instead of May 7 2019. This could lead to confusion when testing time conditions.

      [asterisk@freepbx ~]$ date
      Tue May 7 07:37:26 -03 2019
      [asterisk@freepbx ~]$ /var/lib/asterisk/bin/schedtc.php --debug
      Time Now:07:37|Tue|7|May|America/Argentina/Cordoba

      ==Working with TimeCondition:GUARDIA==
      INVERTED BLF: false (NOT_INUSE = NOT_INUSE & INUSE = INUSE)
      OVERRIDE MODE: not set
      =>2019-05-08 07:00:00 is now
      TIME MATCHED: True (NOT_INUSE)
      BLF MODE: True (NOT_INUSE)
      Privilege: Command
      Changing TC1 to NOT_INUSE

      As you can see, Time Now is 07:37|Tue|7|May but later is shows =>2019-05-08 07:00:00 is now

      The time condition seems to work correctly, but this way of showing the debug might cause confusion if troubleshooting is needed.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arielgrin arielgrin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.