• Icon: Specification change (Sub-task) Specification change (Sub-task)
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 5.2.0beta1, 5.2 (plan)
    • None
    • Server (S)
    • None
    • Team I
    • Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 80 (Sep 2021)
    • 3

      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)
      

            dimir dimir
            palivoda Rostislav Palivoda
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: