mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-29 13:36:13 +00:00
Fix: [remote calendar ms graph] set another date format
The previous date format was compliant with the spec described here: https://learn.microsoft.com/en-us/graph/api/user-list-calendarview?view=graph-rest-1.0&tabs=http However, the date format was not accepted. This should be fix the date format.
This commit is contained in:
parent
48f5e7d21f
commit
33051366d4
@ -107,8 +107,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
'users/' . $userId . '/calendarView',
|
'users/' . $userId . '/calendarView',
|
||||||
[
|
[
|
||||||
'query' => [
|
'query' => [
|
||||||
'startDateTime' => $startDate->format(DateTimeImmutable::ATOM),
|
'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'endDateTime' => $endDate->format(DateTimeImmutable::ATOM),
|
'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'$count' => 'true',
|
'$count' => 'true',
|
||||||
'$top' => 0,
|
'$top' => 0,
|
||||||
],
|
],
|
||||||
@ -181,8 +181,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
'users/' . $userId . '/calendarView',
|
'users/' . $userId . '/calendarView',
|
||||||
[
|
[
|
||||||
'query' => [
|
'query' => [
|
||||||
'startDateTime' => $startDate->format(DateTimeImmutable::ATOM),
|
'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'endDateTime' => $endDate->format(DateTimeImmutable::ATOM),
|
'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'$select' => 'id,subject,start,end,isAllDay',
|
'$select' => 'id,subject,start,end,isAllDay',
|
||||||
'$top' => $limit,
|
'$top' => $limit,
|
||||||
'$skip' => $offset,
|
'$skip' => $offset,
|
||||||
@ -539,7 +539,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
$userId = $this->mapCalendarToUser->getUserId($user);
|
$userId = $this->mapCalendarToUser->getUserId($user);
|
||||||
|
|
||||||
if (null === $userId) {
|
if (null === $userId) {
|
||||||
throw new Exception('no remote calendar for this user', [
|
throw new Exception('no remote calendar for this user', 55698, [
|
||||||
'user' => $user->getId(),
|
'user' => $user->getId(),
|
||||||
'remoteId' => $remoteId,
|
'remoteId' => $remoteId,
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user