zpush seems to use a timestamp in utc (at least vcard backend does) for birthdays

This commit is contained in:
Ralf Becker 2011-02-15 11:37:09 +00:00
parent 2d26d18c74
commit 740f91863b

View File

@ -325,8 +325,14 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
if (!empty($contact[$attr])) $message->$key = base64_encode($contact[$attr]); if (!empty($contact[$attr])) $message->$key = base64_encode($contact[$attr]);
break; break;
case 'bday': // zpush uses timestamp in servertime case 'bday': // zpush seems to use a timestamp in utc (at least vcard backend does)
if (!empty($contact[$attr])) $message->$key = egw_time::to($contact[$attr],'server'); if (!empty($contact[$attr]))
{
$tz = date_default_timezone_get();
date_default_timezone_set('UTC');
$message->birthday = strtotime($contact[$attr]);
date_default_timezone_set($tz);
}
break; break;
case 'cat_id': case 'cat_id':