mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix incorrect value of DateTime::formatTimestamp() if timestamp is not given
This commit is contained in:
parent
9a7445b677
commit
3ee6eaa363
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue