From: <tr...@eg...> - 2011-02-25 11:23:01
|
Ticket modified by camel camel at 2011/02/25 12:22 Tracking System: Bugs Category: ActiveSync Version: Trunk Status: Pending Resolution: None Completed: 0% Priority: 5 - medium Created By: camel camel Created on: 2011/02/15 16:37 Assigned to: Philip Herbert Summary: #2857 - contact: bday (birthday) does not sync from PDA to EGW contact: birthday does not sync from PDA to EGW please can anyone support this - or maybe vladimir can write a patch ? Comment by camel camel at 2011/02/25 12:22: therefore a patch is existing ... maybe it is not AS rfc conform, but i know, that this bug will exist very often on a lot of android systems ... (2.1,2.2.1JS5, 2.3.2) maybe it can be included ... see patch from #2858 Comment by camel camel at 2011/02/16 16:38: oh, yes, that could be .. iahve tested it on 2.2.1, 2.3.... maybe on 2.1 and 2.2 it will be sent in this format. but on gingerbred framwork (JS5, 2.2.x/2.3/2.4) it will be sent in: YYYY-MM-DD so we can handle, this fu**ing bug from android :) also the email address is strange from android (only tested now from 2.2.1) -< there is another ticket opened for that ... please check it -> it will be sent on my system as: "Firstname Familiename" and not as it should be: ema...@em... but, therefore there is no extra parser, maybe i must try to fix that. please check it, how it will be sent from your native froyo ... 1.) create contact in your phone + firstname + lastname to the new contact + add email address + add birthday, then try it again thanks -cu camel Comment by Vladimir Kolobkov at 2011/02/16 14:20: I have not any problems to sync contact birthdays from android to egw (without this patch). Androis send birthdays like 1969-04-04T21:00:00.000Z and egw correctly import it. Comment by camel camel at 2011/02/15 23:21: i tested this on android... android send it in "Y-m-d" in xml, so the parser analyse it as invalid date format ... patch: streamer.php [-M--] 0 L:[249+ 7 256/280] *(11520/12514b) 0032 0x020 function formatDate($ts, $type) { if($type == STREAMER_TYPE_DATE) return gmstrftime("%Y%m%dT%H%M%SZ", $ts); else if($type == STREAMER_TYPE_DATE_DASHES) return gmstrftime("%Y-%m-%dT%H:%M:%S.000Z", $ts); } function parseDate($ts) { if(preg_match("/(\d{4})[^0-9]*(\d{2})[^0-9]*(\d{2})T(\d{2})[^0-9]*(\d{2})[^0-9]*(\d{2})(.\d+)?Z/", $ts, $matches)) { if ($matches[1] >= 2038){ $matches[1] = 2038; $matches[2] = 1; $matches[3] = 18; $matches[4] = $matches[5] = $matches[6] = 0; } return gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); } + //date case for android - from android it will sent as: YYYY-MM-DD ex: 2007-07-28 + if(preg_match("/(\d{4})\-(\d{2})\-(\d{2})/", $ts, $matches)) { + if ($matches[1] >= 2038){ + $matches[1] = 2038; + $matches[2] = 1; + $matches[3] = 18; + } + $matches[4] = $matches[5] = $matches[6] = 0; + return gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); + } return 0; } }; linked entries: http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2857&no_popup=1 |