1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-25 15:01:29 +02:00

- class DateTime support

- DibiProfiler checks whether headers was sent
This commit is contained in:
David Grudl
2008-12-28 19:27:16 +00:00
parent 781274ba65
commit 4b189b93d6
3 changed files with 8 additions and 2 deletions

View File

@@ -307,7 +307,8 @@ final class DibiTranslator extends DibiObject
case 'd': // date
case 't': // datetime
return $this->driver->escape(is_numeric($value) ? (int) $value : strtotime($value), $modifier);
$value = is_numeric($value) ? (int) $value : ($value instanceof DateTime ? $value->format('U') : strtotime($value));
return $this->driver->escape($value, $modifier);
case 'by':
case 'n': // identifier name