diff --git a/onyx/modules/templates/smarty/plugins/modifier.date_format.php b/onyx/modules/templates/smarty/plugins/modifier.date_format.php index 5ad7540b..a0cb2cab 100644 --- a/onyx/modules/templates/smarty/plugins/modifier.date_format.php +++ b/onyx/modules/templates/smarty/plugins/modifier.date_format.php @@ -43,6 +43,7 @@ function smarty_modifier_date_format($string, $format = null, $default_date = '' } else { return; } + $timestamp += 3600; if ($formatter == 'strftime' || ($formatter == 'auto' && strpos($format, '%') !== false)) { if (DS == '\\') { $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T'); diff --git a/onyx/modules/templates/smarty/plugins/shared.make_timestamp.php b/onyx/modules/templates/smarty/plugins/shared.make_timestamp.php index 7c94e5f5..58bea326 100644 --- a/onyx/modules/templates/smarty/plugins/shared.make_timestamp.php +++ b/onyx/modules/templates/smarty/plugins/shared.make_timestamp.php @@ -20,7 +20,7 @@ function smarty_make_timestamp($string) { if (empty($string)) { // use "now": - return time(); + return localtime(); } elseif ($string instanceof DateTime) { return $string->getTimestamp(); } elseif (strlen($string) == 14 && ctype_digit($string)) { @@ -29,13 +29,13 @@ function smarty_make_timestamp($string) substr($string, 4, 2), substr($string, 6, 2), substr($string, 0, 4)); } elseif (is_numeric($string)) { // it is a numeric string, we handle it as timestamp - return (int) $string; + return localtime($string); } else { // strtotime should handle it $time = strtotime($string); if ($time == - 1 || $time === false) { // strtotime() was not able to parse $string, use "now": - return time(); + return localtime(); } return $time;