mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-26 15:11:45 +01:00
* eSync: fix whole-day events were one day longer (shifted by timezone difference)
This commit is contained in:
parent
3810ea4e35
commit
e88230dd8f
@ -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 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
|
* @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
|
* Check if the event is the whole day
|
||||||
*
|
*
|
||||||
* @param array $event event
|
* @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)
|
public static function isWholeDay($event)
|
||||||
{
|
{
|
||||||
|
@ -1077,7 +1077,9 @@ class calendar_zpush implements activesync_plugin_write, activesync_plugin_meeti
|
|||||||
}
|
}
|
||||||
if (($message->alldayevent = (int)calendar_bo::isWholeDay($event)))
|
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
|
// copying strings
|
||||||
foreach(array(
|
foreach(array(
|
||||||
|
Loading…
Reference in New Issue
Block a user