* eSync: fix whole-day events were one day longer (shifted by timezone difference)

This commit is contained in:
ralf 2024-05-15 11:29:37 +02:00
parent 3810ea4e35
commit e88230dd8f
2 changed files with 5 additions and 3 deletions

View File

@ -1450,7 +1450,7 @@ class calendar_bo
}
/**
* Converts a date as timestamp or array to a date-string and optionaly converts server- to user-time
* Converts a date as timestamp or array to a date-string and optionally converts server- to user-time
*
* @param mixed $date integer timestamp or array with ('year','month',..,'second') to convert
* @param boolean $server2user conversation between user- and server-time default False == Off, not used if $format ends with \Z
@ -2172,7 +2172,7 @@ class calendar_bo
* Check if the event is the whole day
*
* @param array $event event
* @return boolean true if whole day event, false othwerwise
* @return boolean true if whole day event, false otherwise
*/
public static function isWholeDay($event)
{

View File

@ -1077,7 +1077,9 @@ class calendar_zpush implements activesync_plugin_write, activesync_plugin_meeti
}
if (($message->alldayevent = (int)calendar_bo::isWholeDay($event)))
{
++$message->endtime; // EGw all-day-events are 1 sec shorter!
// all-day-events in EGw are with time=00:00 in user- and not server-timezone, as used by ZPush
$message->starttime = Api\DateTime::user2server($message->starttime,'ts');
$message->endtime = Api\DateTime::user2server($message->endtime+1,'ts'); // EGw all-day-events are 1 sec shorter!
}
// copying strings
foreach(array(