mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-13 15:48:17 +01:00
allow all DateTimeInterface objects, not just DateTime e.g. DateTimeImmutable
This commit is contained in:
parent
c298149070
commit
054b33121e
@ -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