From 3ee6eaa3636f60af2a20ca1c50df4e0c1b049972 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 23 May 2016 23:43:04 +0900 Subject: [PATCH] Fix incorrect value of DateTime::formatTimestamp() if timestamp is not given --- common/framework/datetime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/framework/datetime.php b/common/framework/datetime.php index 6c19c0b29..5e76428cd 100644 --- a/common/framework/datetime.php +++ b/common/framework/datetime.php @@ -22,7 +22,7 @@ class DateTime public static function formatTimestamp($format, $timestamp = null) { $offset = Config::get('locale.internal_timezone') ?: date('Z', $timestamp); - return gmdate($format, $timestamp + $offset); + return gmdate($format, ($timestamp ?: time()) + $offset); } /**