Hello,

I'm sorry i'm not sure if this is the best place to post this or not or if the backend developers already know about it but I've found a bug and subsequently a fix/workaround for an error within the zimbra z-push backend version 45 when working with PHP5.2.14 (I'm not able to test with other versions) with the zimbra provisioning 47.

When syncing calendar to an iphone ios4 device (again, sorry I haven't got other devices to test with) a soap error occurs:
10/31/10 14:43:23 [8717] ERROR: service.INVALID_REQUEST: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><session id="1945">1945</session><change token="55"/></context></soap:Header><soap:Body><soap:Fault><soap:Code><soa p:Value>soap:Sender</soap:Value></soap:Code><soap:Reason><soap:Text>invalid request: invalid long value '1.285854203E+12' for attribute: calExpandInstStart</soap:Text></soap:Reason><soapetail><Error xmlns="urn:zimbra"><Code>service.INVALID_REQUEST</Code><Trace>com.zimbra.common.service.ServiceExcep tion: invalid request: invalid long value '1.285854203E+12' for attribute: calExpandInstStart

Basically, it is due to the variables $calExpandInstStart and $calExpandInstEnd containing scientific notation values.

The workaround is as follows:
Replace Line 1284 and 1285 with:
$calExpandInstStart = sprintf("%.0f",$cutoffdate * 1000);
$calExpandInstEnd = sprintf("%.0f",(time() + (366*24*60*60))* 1000);

Replace Line 1296 and 1297 with:
$calExpandInstStart = sprintf("%.0f",(time() - (366*24*60*60))* 1000);
$calExpandInstEnd = sprintf("%.0f",(time() + (366*24*60*60))* 1000);

Replace Line 1310 and 1311 with:
$calExpandInstStart = sprintf("%.0f",(time() - (366*24*60*60))* 1000);
$calExpandInstEnd = sprintf("%.0f",(time() + (366*24*60*60))* 1000);

This workaround/patch/fix basically converts scientific notation to an integer. There may be a better work around than this, I'm just sharing what I've found in the hope that somebody else will find it useful.

Thanks
Craig