diff --git a/tine20/Tinebase/DateTime.php b/tine20/Tinebase/DateTime.php index fe8c5e4b4e..a239a9032b 100644 --- a/tine20/Tinebase/DateTime.php +++ b/tine20/Tinebase/DateTime.php @@ -88,11 +88,11 @@ public function __wakeup(): void public function __construct($_time = "now", $_timezone = null) { // allow to pass instanceof DateTime - if ($_time instanceof DateTime) { + if ($_time instanceof DateTimeInterface) { if (! $_timezone) { $_timezone = $_time->getTimezone(); } else { - $_time = clone $_time; + $_time = DateTime::createFromInterface($_time); $_time->setTimezone($_timezone); }