mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 02:49:39 +01:00
allow all DateTimeInterface objects, not just DateTime e.g. DateTimeImmutable
This commit is contained in:
parent
9d7fe14387
commit
34e0ab7f3f
@ -172,7 +172,7 @@ class DateTime extends \DateTime
|
||||
break;
|
||||
|
||||
case 'object':
|
||||
if ($time instanceof \DateTime)
|
||||
if ($time instanceof \DateTimeInterface) // \DateTime or \DateTimeImmutable
|
||||
{
|
||||
parent::__construct($time->format('Y-m-d H:i:s'),$time->getTimezone());
|
||||
$this->setTimezone($tz);
|
||||
|
Loading…
Reference in New Issue
Block a user