mirror of
https://github.com/dg/dibi.git
synced 2025-08-11 16:44:30 +02:00
dibi internally uses DateTime object in PHP 5.2
This commit is contained in:
@@ -231,10 +231,10 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
return $value ? 1 : 0;
|
||||
|
||||
case dibi::DATE:
|
||||
return date($this->fmtDate, $value);
|
||||
return $value instanceof DateTime ? $value->format($this->fmtDate) : date($this->fmtDate, $value);
|
||||
|
||||
case dibi::DATETIME:
|
||||
return date($this->fmtDateTime, $value);
|
||||
return $value instanceof DateTime ? $value->format($this->fmtDateTime) : date($this->fmtDateTime, $value);
|
||||
|
||||
default:
|
||||
throw new InvalidArgumentException('Unsupported type.');
|
||||
|
Reference in New Issue
Block a user