mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +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:
		| @@ -107,8 +107,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface | ||||
|                 'users/' . $userId . '/calendarView', | ||||
|                 [ | ||||
|                     'query' => [ | ||||
|                         'startDateTime' => $startDate->format(DateTimeImmutable::ATOM), | ||||
|                         'endDateTime' => $endDate->format(DateTimeImmutable::ATOM), | ||||
|                         'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()), | ||||
|                         'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()), | ||||
|                         '$count' => 'true', | ||||
|                         '$top' => 0, | ||||
|                     ], | ||||
| @@ -181,8 +181,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface | ||||
|                 'users/' . $userId . '/calendarView', | ||||
|                 [ | ||||
|                     'query' => [ | ||||
|                         'startDateTime' => $startDate->format(DateTimeImmutable::ATOM), | ||||
|                         'endDateTime' => $endDate->format(DateTimeImmutable::ATOM), | ||||
|                         'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()), | ||||
|                         'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()), | ||||
|                         '$select' => 'id,subject,start,end,isAllDay', | ||||
|                         '$top' => $limit, | ||||
|                         '$skip' => $offset, | ||||
| @@ -539,7 +539,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface | ||||
|         $userId = $this->mapCalendarToUser->getUserId($user); | ||||
|  | ||||
|         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(), | ||||
|                 'remoteId' => $remoteId, | ||||
|             ]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user