mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:19:06 +01:00
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)
This commit is contained in:
parent
1bec0c94a4
commit
1b85a9dd5b
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user