1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-07 06:36:44 +02:00

DateTime53 renamed to DibiDateTime

This commit is contained in:
David Grudl
2010-10-06 16:02:20 +02:00
parent 90592929ec
commit 8d6639fa3c
5 changed files with 25 additions and 30 deletions

View File

@@ -592,7 +592,7 @@ class DibiResult extends DibiObject implements IDataSource
return NULL;
} elseif ($this->dateFormat === '') { // return DateTime object (default)
return new DateTime53(is_numeric($value) ? date('Y-m-d H:i:s', $value) : $value);
return new DibiDateTime(is_numeric($value) ? date('Y-m-d H:i:s', $value) : $value);
} elseif ($this->dateFormat === 'U') { // return timestamp
return is_numeric($value) ? (int) $value : strtotime($value);
@@ -601,7 +601,7 @@ class DibiResult extends DibiObject implements IDataSource
return date($this->dateFormat, $value);
} else {
$value = new DateTime53($value);
$value = new DibiDateTime($value);
return $value->format($this->dateFormat);
}