Skip to content

Commit

Permalink
Make branches for datetime and immutable datetime the same.
Browse files Browse the repository at this point in the history
Refs #8146
  • Loading branch information
markstory committed Jan 31, 2016
1 parent b38fd49 commit 36ce0d5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/I18n/Time.php
Expand Up @@ -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');
}
Expand Down

0 comments on commit 36ce0d5

Please sign in to comment.