Skip to content
Permalink
Browse files

Make branches for datetime and immutable datetime the same.

Refs #8146
  • Loading branch information...
markstory committed Jan 31, 2016
1 parent b38fd49 commit 36ce0d566d5d05d09aabee963fdb82c041086179
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/I18n/Time.php
@@ -103,10 +103,7 @@ class Time extends MutableDateTime implements JsonSerializable
*/
public function __construct($time = null, $tz = null)
{
if ($time instanceof DateTimeImmutable) {
$time = $time->toMutable();
}
if ($time instanceof DateTime) {
if ($time instanceof DateTime || $time instanceof DateTimeImmutable) {
$tz = $time->getTimeZone();
$time = $time->format('Y-m-d H:i:s');
}

0 comments on commit 36ce0d5

Please sign in to comment.
You can’t perform that action at this time.