Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Merge pull request #1357 from pasamio/oracle_timestamp
Browse files Browse the repository at this point in the history
Update Oracle driver to set timestamp format as well as date format
  • Loading branch information
LouisLandry committed Jul 12, 2012
2 parents ec5b559 + bf9f36e commit 6a9d3d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libraries/joomla/database/driver/oracle.php
Expand Up @@ -411,24 +411,25 @@ public function select($database)
* that matches the MySQL one used within most Joomla
* tables.
*
* @param string $dateformat Oracle Date Format String
* @param string $dateFormat Oracle Date Format String
*
* @return boolean
*
* @since 12.1
*/
public function setDateFormat($dateformat = 'DD-MON-RR')
public function setDateFormat($dateFormat = 'DD-MON-RR')
{
$this->connect();

$this->setQuery("alter session set nls_date_format = '$dateformat'");
$this->setQuery("ALTER SESSION SET NLS_DATE_FORMAT = '$dateFormat'");
$this->setQuery("ALTER SESSION SET NLS_TIMESTAMP_FORMAT = '$dateFormat'");

if (!$this->execute())
{
return false;
}

$this->dateformat = $dateformat;
$this->dateformat = $dateFormat;

return true;
}
Expand Down

0 comments on commit 6a9d3d4

Please sign in to comment.