Command/ClientStatsCommand.php
private function getDateParams($params)
    {
        /**
         * @var \DateTime
         */
        $to = $this->dateContext;
        /**
         * @var \DateTime
         */
        $from = clone $to;
        $from->sub(new \DateInterval('PT4M'));
        $from->sub(new \DateInterval('PT59S'));

        $params['dateFrom'] = $from->format('Y-m-d H:i:s');

        $params['dateTo'] = $to->format('Y-m-d H:i:s');

        return $params;
    }
private function getDateParams($params)
    {
        /**
         * @var \DateTime
         */
        $to = $this->dateContext;
        /**
         * @var \DateTime
         */
        $from = clone $to;
        $from->sub(new \DateInterval('PT4M'));
        $from->sub(new \DateInterval('PT59S'));

        $params['dateFrom'] = $from->format('Y-m-d H:i:s');

        $params['dateTo'] = $to->format('Y-m-d H:i:s');

        return $params;
    }
private function getDateParams ( $ params ) { /**
         * @var \DateTime
         */ $ to = $ this -> dateContext ; /**
         * @var \DateTime
         */ $ from = clone $ to ; $ from -> sub ( new \ DateInterval ( 'PT4M' ) ) ; $ from -> sub ( new \ DateInterval ( 'PT59S' ) ) ; $ params [ 'dateFrom' ] = $ from -> format ( 'Y-m-d H:i:s' ) ; $ params [ 'dateTo' ] = $ to -> format ( 'Y-m-d H:i:s' ) ; return $ params ; }
Return 5 minute to and from intervals based on dateContext.

@param string

@return array

@throws \Exception
Return 5 minute to and from intervals based on dateContext .