Templating/Helper/TimeFormatterHelper.php
private function convertFormat($time, $dateFormat)
    {
        if (!($time instanceof \DateTime)) {
            if (is_numeric($time)) {
                $transformer = new DateTimeToTimestampTransformer();
                $time = $transformer->reverseTransform($time);
            } else {
                $transformer = new DateTimeToStringTransformer(null, null, $dateFormat);
                $time = $transformer->reverseTransform($time);
            }
        }

        return $time;
    }
private function convertFormat($time, $dateFormat)
    {
        if (!($time instanceof \DateTime)) {
            if (is_numeric($time)) {
                $transformer = new DateTimeToTimestampTransformer();
                $time = $transformer->reverseTransform($time);
            } else {
                $transformer = new DateTimeToStringTransformer(null, null, $dateFormat);
                $time = $transformer->reverseTransform($time);
            }
        }

        return $time;
    }
private function convertFormat ( $ time , $ dateFormat ) { if ( ! ( $ time instanceof \ DateTime ) ) { if ( is_numeric ( $ time ) ) { $ transformer = new DateTimeToTimestampTransformer ( ) ; $ time = $ transformer -> reverseTransform ( $ time ) ; } else { $ transformer = new DateTimeToStringTransformer ( null , null , $ dateFormat ) ; $ time = $ transformer -> reverseTransform ( $ time ) ; } } return $ time ; }
Converting date format to expected by methods

@param \DateTime|string|int $time
@param string $dateFormat

@return \DateTime
Converting date format to expected by methods