src/Analytics.php
public function getData($rp, $metric, $tags, $granularity = 'daily', $startDt = null, $endDt = '2100-12-01T00:00:00Z', $timezone = 'UTC') {
        $points = [];
        try {            
            $pointsRp = $this->mapper->getRpPoints($rp, $metric, $tags, $granularity, $startDt, $endDt, $timezone);
            $pointsTmp = $this->mapper->getPoints($metric, $tags, $granularity, $endDt, $timezone);

            if (count($pointsRp) > 0 || count($pointsTmp) > 0) {
                $points = $this->combineSumPoints(
                                $pointsRp, $this->fixTimeForGranularity($pointsTmp, $granularity)
                );
            }
            return $points;
        } catch (Exception $e) {
            throw new AnalyticsException("Analytics client period get data exception", 0, $e);
        }        
    }
public function getData($rp, $metric, $tags, $granularity = 'daily', $startDt = null, $endDt = '2100-12-01T00:00:00Z', $timezone = 'UTC') {
        $points = [];
        try {            
            $pointsRp = $this->mapper->getRpPoints($rp, $metric, $tags, $granularity, $startDt, $endDt, $timezone);
            $pointsTmp = $this->mapper->getPoints($metric, $tags, $granularity, $endDt, $timezone);

            if (count($pointsRp) > 0 || count($pointsTmp) > 0) {
                $points = $this->combineSumPoints(
                                $pointsRp, $this->fixTimeForGranularity($pointsTmp, $granularity)
                );
            }
            return $points;
        } catch (Exception $e) {
            throw new AnalyticsException("Analytics client period get data exception", 0, $e);
        }        
    }
public function getData ( $ rp , $ metric , $ tags , $ granularity = 'daily' , $ startDt = null , $ endDt = '2100-12-01T00:00:00Z' , $ timezone = 'UTC' ) { $ points = [ ] ; try { $ pointsRp = $ this -> mapper -> getRpPoints ( $ rp , $ metric , $ tags , $ granularity , $ startDt , $ endDt , $ timezone ) ; $ pointsTmp = $ this -> mapper -> getPoints ( $ metric , $ tags , $ granularity , $ endDt , $ timezone ) ; if ( count ( $ pointsRp ) > 0 || count ( $ pointsTmp ) > 0 ) { $ points = $ this -> combineSumPoints ( $ pointsRp , $ this -> fixTimeForGranularity ( $ pointsTmp , $ granularity ) ) ; } return $ points ; } catch ( Exception $ e ) { throw new AnalyticsException ( "Analytics client period get data exception" , 0 , $ e ) ; } }
Get analytics data in right time zone by period and granularity

@param string $rp
@param string $metric
@param array $tags
@param string $granularity
@param string $startDt
@param string $endDt
@param string $timezone
@return int
@throws AnalyticsException
Get analytics data in right time zone by period and granularity