From 1b85a9dd5ba527b0221a95aef21a30be48e469be 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 c5b8fbd304..4d5fda4c69 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -1067,29 +1067,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 *