Permalink
Browse files

DibiConnection: added config option "result|formatDate"

  • Loading branch information...
1 parent 0f21b6c commit e4ed284e77df89ec7e2baf9108028f85d220c1cb @dg committed Jan 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 dibi/libs/DibiConnection.php
@@ -80,6 +80,7 @@ public function __construct($config, $name = NULL)
self::alias($config, 'username', 'user');
self::alias($config, 'password', 'pass');
self::alias($config, 'host', 'hostname');
+ self::alias($config, 'result|formatDate', 'resultDate');
self::alias($config, 'result|formatDateTime', 'resultDateTime');
if (!isset($config['driver'])) {
@@ -485,7 +486,8 @@ public function rollback($savepoint = NULL)
public function createResultSet(IDibiResultDriver $resultDriver)
{
$res = new DibiResult($resultDriver);
- return $res->setFormat(dibi::DATETIME, $this->config['result']['formatDateTime']);
+ return $res->setFormat(dibi::DATE, $this->config['result']['formatDate'])
+ ->setFormat(dibi::DATETIME, $this->config['result']['formatDateTime']);
}

0 comments on commit e4ed284

Please sign in to comment.