src/Joomla/Shop/InvoiceManager.php
protected function toSql($date)
    {
        $tz = new DateTimeZone(JFactory::getApplication()->get('offset'));
        $date = new JDate($date);
        $date->setTimezone($tz);
        return $date->toSql(true);
    }
protected function toSql($date)
    {
        $tz = new DateTimeZone(JFactory::getApplication()->get('offset'));
        $date = new JDate($date);
        $date->setTimezone($tz);
        return $date->toSql(true);
    }
protected function toSql ( $ date ) { $ tz = new DateTimeZone ( JFactory :: getApplication ( ) -> get ( 'offset' ) ) ; $ date = new JDate ( $ date ) ; $ date -> setTimezone ( $ tz ) ; return $ date -> toSql ( true ) ; }
Helper method that returns a date in the correct and escaped sql format.

@param string $date
Date in yyyy-mm-dd format.

@return string

@throws \Exception
Helper method that returns a date in the correct and escaped sql format .