From e0feb09df27703ae1ee57d636cc90414d4c33e69 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 1 Dec 2023 14:12:21 +0200 Subject: [PATCH] WIP Timesheet REST API: fix PHP Fatal error in Addressbook REST API Declaration of EGroupware\Api\Contacts\JsContact::UTCDateTime($date) must be compatible with EGroupware\Api\CalDAV\JsBase::UTCDateTime($date, bool $user = false) --- api/src/Contacts/JsContact.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/api/src/Contacts/JsContact.php b/api/src/Contacts/JsContact.php index 5b2329fab4..54081fa2e3 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -1066,29 +1066,6 @@ class JsContact extends Api\CalDAV\JsBase return $value; } - /** - * Return a date-time value - * - * @link https://datatracker.ietf.org/doc/html/draft-ietf-jmap-jscontact-07#section-1.5.5 - * @param null|string|\DateTime $date - * @return string|null - */ - protected static function UTCDateTime($date) - { - static $utc=null; - if (!isset($utc)) $utc = new \DateTimeZone('UTC'); - - if (!isset($date)) - { - return null; - } - $date = Api\DateTime::to($date, 'object'); - $date->setTimezone($utc); - - // we need to use "Z", not "+00:00" - return substr($date->format(Api\DateTime::RFC3339), 0, -6).'Z'; - } - /** * Get jsCardGroup for given group *