mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 17:29:53 +02:00
- class DateTime support
- DibiProfiler checks whether headers was sent
This commit is contained in:
@@ -527,8 +527,13 @@ class dibi
|
||||
{
|
||||
if ($time === NULL) {
|
||||
$time = time(); // current time
|
||||
|
||||
} elseif (is_numeric($time)) {
|
||||
$time = (int) $time; // timestamp
|
||||
|
||||
} elseif ($time instanceof DateTime) {
|
||||
$time = $time->format('U');
|
||||
|
||||
} else {
|
||||
$time = strtotime($time); // try convert to timestamp
|
||||
}
|
||||
|
Reference in New Issue
Block a user