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

Update Oracle driver to set timestamp format as well as date format #1357

Merged
merged 1 commit into from Jul 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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