diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -859,6 +859,14 @@ static function gets() } /** + * Like time() but overridable via debug param + */ +function time() +{ + return ($t = EDC('time')) ? strtotime($t) : time(); +} + +/** * Output formatted and localized date * @param format optional format (default is 2007-01-02 03:04:05). * Other formats are "date", "datetime", "time". @@ -870,9 +878,9 @@ static function gets() static function date($format = "", $stamp = null) { if (!isset($stamp)) - $stamp = EDC('time') ? strtotime(EDC('time')) : time(); + $stamp = it::time(); else if (is_string($stamp) && !ctype_digit($stamp)) - $stamp = strtotime($stamp); + $stamp = strtotime($stamp, it::time()); list($name, $language) = explode(":", $format); |