Commit 698d66a2 by Qiang Xue

fixed test break

parent 1ebe46c6
...@@ -344,9 +344,8 @@ class Formatter extends Component ...@@ -344,9 +344,8 @@ class Formatter extends Component
*/ */
protected function formatTimestamp($value, $format) protected function formatTimestamp($value, $format)
{ {
$date = new DateTime(); $date = new DateTime(null, is_string($this->timeZone) ? new \DateTimeZone($this->timeZone) : $this->timeZone);
$date->setTimestamp($value); $date->setTimestamp($value);
$date->setTimezone($this->timeZone);
return $date->format($format); return $date->format($format);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment