Details

    • Type: Specification change (Sub-task)
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0beta1, 5.2 (plan)
    • Component/s: Server (S)
    • Labels:
      None
    • Team:
      Team I
    • Sprint:
      Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020)
    • Story Points:
      3

      Description

      typedef enum
      {
          ZBX_TREND_PERIOD_HOUR = 1,
          ZBX_TREND_PERIOD_DAY,
          ZBX_TREND_PERIOD_WEEK,
          ZBX_TREND_PERIOD_MONTH,
          ZBX_TREND_PERIOD_YEAR
      }
      zbx_trend_period_base_t;
       
      /******************************************************************************
       *                                                                            *
       * Function: zbx_trends_parse_range                                           *
       *                                                                            *
       * Purpose: parse trend function period arguments into time range             *
       *                                                                            *
       * Parameters: from         - [IN] the time the period shift is calculated    *
       *                                 from                                       *
       *             period       - [IN] the history period                         *
       *             period_shift - [IN] the history period shift                   *
       *             start        - [OUT] the period start time in seconds since    *
       *                                  Epoch                                     *
       *             end          - [OUT] the period end time in seconds since      *
       *                                  Epoch                                     *
       *             error        - [OUT] the error message if parsing failed       *
       *                                                                            *
       * Return value: SUCCEED - period was parsed successfully                     *
       *               FAIL    - invalid time period was specified                  *
       *                                                                            *
       * Comments: Daylight saving changes are applied when parsing ranges with     *
       *           day+ used as period base (now/?).                                *
       *                                                                            *
       *           Example period_shift values:                                     *
       *             now/d                                                          *
       *             now/d-1h                                                       *
       *             now/d+1h                                                       *
       *             now/d+1h/w                                                     *
       *             now/d/w/h+1h+2h                                                *
       *             now-1d/h                                                       *
       *                                                                            *
       ******************************************************************************/
      int     zbx_trends_parse_range(time_t from, const char *period, const char *period_shift, int *start, int *end,
                      char **error)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dimir dimir
              Reporter:
              palivoda Rostislav Palivoda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: