Summary | Work around inconsistent handling of birthday and anniversary fields in ActiveSync |
Queue | Synchronization |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | ryu (at) ryux (dot) org |
Created | 08/19/2013 (4338 days ago) |
Due | |
Updated | 12/30/2013 (4205 days ago) |
Assigned | 12/24/2013 (4211 days ago) |
Resolved | 12/30/2013 (4205 days ago) |
Milestone | |
Patch | No |
I just set the timezone of the server to Europe/Paris (I'm from
France) and the synchronisation is OK in both direction.
It is a pretty workaround for users using Horde in the same timezone.
It works with my ios 4.2.1 perfectly !
Thanks
php.ini fixed the time shifting problem for time zone "Europe/Berlin"
on activesync with iPhone 5 running iOS 7.04 (11B554a). Thanks a lot!
31/08/93 syncs as:
2013-12-28T14:03:53+10:00 DEBUG: [11256] I <POOMCONTACTS:Birthday>
2013-12-28T14:03:53+10:00 DEBUG: [11256] I 1993-08-31T08:00:00.000Z
2013-12-28T14:03:53+10:00 DEBUG: [11256] I </POOMCONTACTS:Birthday>
So still plus 8 instead of the iPad's minus 10.
But displays correctly in Turba as 31st August.
That then correctly syncs out to iPad as:
2013-12-28T14:04:23+10:00 DEBUG: [11261] O <POOMCONTACTS:Birthday>
2013-12-28T14:04:23+10:00 DEBUG: [11261] O 1993-08-30T14:00:00.000Z
2013-12-28T14:04:23+10:00 DEBUG: [11261] O </POOMCONTACTS:Birthday>
Thanks all.
Yes. I am in GMT+10 (Australia).
Now setting a birthday as 27/1/89 on the 7.0.3 iPad syncs as follows:
2013-12-28T13:55:01+10:00 DEBUG: [11326] I <POOMCONTACTS:Birthday>
2013-12-28T13:55:01+10:00 DEBUG: [11326] I 1989-01-26T14:00:00.000Z
2013-12-28T13:55:01+10:00 DEBUG: [11326] I </POOMCONTACTS:Birthday>
Turba correctly shows this birthdate as 27th. It is in SQL as 1989-01-27.
This syncs back out to my Zperia Tablet Z (Android 4.3) as:
2013-12-28T14:00:07+10:00 DEBUG: [11327] O <POOMCONTACTS:Birthday>
2013-12-28T14:00:07+10:00 DEBUG: [11327] O 1989-01-26T14:00:00.000Z
2013-12-28T14:00:07+10:00 DEBUG: [11327] O </POOMCONTACTS:Birthday>
And correctly displays as 27th January.
So at this stage, all I need to do is check iPad to Horde to iPhone
and back, but all looking OK for me... :)
I just set the timezone of the server to Europe/Paris (I'm from
France) and the synchronisation is OK in both direction.
It is a pretty workaround for users using Horde in the same timezone.
It works with my ios 4.2.1 perfectly !
Thanks
2013-12-27T05:15:26+00:00 DEBUG: [24043] O <POOMCONTACTS:Birthday>
2013-12-27T05:15:26+00:00 DEBUG: [24043] O 2002-04-23T00:00:00.000Z
2013-12-27T05:15:26+00:00 DEBUG: [24043] O </POOMCONTACTS:Birthday>
2002-04-24T08:00:00.000Z.
Can you provide me with some device details? Agent string, android
version etc... ? Could be the code isn't sniffing out the android
version properly...or it's an old android version without proper
support for the field (Android versions < 4).
2013-12-27T05:15:20+00:00 DEBUG: [24248] I 2002-04-23T14:00:00.000Z
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:Birthday>
the timezones are the same on the device and the server. This is
because date values in the EAS protocol are always sent as UTC and
converted to local timezone on device and server.
iOS *always* seems to assume the birthday is at midnight, on the
entered date in the device's local timezone. So, when the record is
sent to the server, it is adjusted to UTC. The server then re-adjusts
it back to the server's local timezone. The only way this will 100%
result in an accurate date is if the timezones are the same.
devices set to?
2013-12-27T05:26:09+00:00 DEBUG: [24046] I <POOMCONTACTS:Birthday>
2013-12-27T05:26:09+00:00 DEBUG: [24046] I 2002-04-24T08:00:00.000Z
2013-12-27T05:26:09+00:00 DEBUG: [24046] I </POOMCONTACTS:Birthday>
So it syncs at the date + 8 hours (the iPad synced at the date -10 hours).
The server then syncs back to the iPad with:
2013-12-27T05:26:41+00:00 DEBUG: [24043] O <POOMCONTACTS:Birthday>
2013-12-27T05:26:41+00:00 DEBUG: [24043] O 2002-04-24T00:00:00.000Z
2013-12-27T05:26:41+00:00 DEBUG: [24043] O </POOMCONTACTS:Birthday>
End result is correct on all devices.
So if I set the date on the Android or the server I get a correct
result on all devices.
If I edit the contact on the iPad it drops back a day on the server to
the 23rd, which then syncs to the Android as the 23rd, incorrect.
2013-12-27T05:15:26+00:00 DEBUG: [24043] O <POOMCONTACTS:Birthday>
2013-12-27T05:15:26+00:00 DEBUG: [24043] O 2002-04-23T00:00:00.000Z
2013-12-27T05:15:26+00:00 DEBUG: [24043] O </POOMCONTACTS:Birthday>
5336108190 Provisioned APPLDLXFT5X3DFJ2
Birthdate entered on the iPad as 24th April, synced to server as 23rd.
2013-12-27T05:15:20+00:00 INFO: [24248] Loading state for synckey
{52bd0b3c-e9b4-4551-b98e-5deec0a801e6}17
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <Modify>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <ServerEntryId>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I [60 bytes of content]
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </ServerEntryId>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <Data>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <AirSyncBase:Body>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <AirSyncBase:Type>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I 1
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </AirSyncBase:Type>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <AirSyncBase:Data />
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </AirSyncBase:Body>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Birthday>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I 2002-04-23T14:00:00.000Z
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:Birthday>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Email1Address>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I **********************
2013-12-27T05:15:20+00:00 DEBUG: [24248] I
</POOMCONTACTS:Email1Address>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Email2Address>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I **********************
2013-12-27T05:15:20+00:00 DEBUG: [24248] I
</POOMCONTACTS:Email2Address>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:FileAs>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I **********************
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:FileAs>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:FirstName>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I ********
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:FirstName>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:LastName>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I Wilson
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:LastName>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Picture />
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Categories>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I <POOMCONTACTS:Category>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I Family
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:Category>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </POOMCONTACTS:Categories>
2013-12-27T05:15:20+00:00 DEBUG: [24248] I </Data>
2013-12-27T05:15:20+00:00 INFO: [24248]
Horde_Core_ActiveSync_Driver::_smartStatMessage(@Contacts@,
20130503091539.Xx-bLJ7JaWUR7JoAyciBRA4@mail.simonandkate.net)
2013-12-27T05:15:20+00:00 INFO: [24248]
Horde_Core_ActiveSync_Driver::changeMessage(@Contacts@,
20130503091539.Xx-bLJ7JaWUR7JoAyciBRA4@mail.simonandkate.net ...)
2013-12-27T05:15:20+00:00 INFO: [24248]
Horde_Core_ActiveSync_Driver::_smartStatMessage(@Contacts@,
20130503091539.Xx-bLJ7JaWUR7JoAyciBRA4@mail.simonandkate.net)
2013-12-27T05:15:20+00:00 INFO: [24248] Updating state during change
State ⇒ Assigned
to treat the incoming birthday field the same anyway... it's far more
likely that we are not actually entering/changing the birthday on the
device, but rather it is being sent as part of another edit (even
though it shouldn't be, but that's a completely different story).
I'll look at this some more when I'm back in my office.
State ⇒ Resolved
Assigned to Michael Rubinsky
be accurate in later versions. Earlier versions do not use any
consistency in the time the birthday is represented as. When the
birthday is entered/changed on the device it uses the current time of
day. No idea what time it expects it as when the birthday is
transmitted to the device. My guess is it ignores the time entirely
and does not perform any UTC -> timezone translation.
New Attachment: syncLog.txt
attempt to work around this bug. It relies on sniffing out the
client in use and adjusting the birthday accordingly. So, if it is
still not working for anyone, please provide the device information
(from the activesync properties screen) and the log showing the
contact being synched.
Device Information
Id: Appl888298T71R4
Clef d'accès: 0
User Agent: Apple-iPhone1C2/803.148
EAS Version: 14.0
And the sync log in attachment
The birthday is 06/05/1981 (6th of may 1981). I leave in France if
this is important for the time zone.
I did not check with a newer device with ios 7...
Ryu
attempt to work around this bug. It relies on sniffing out the
client in use and adjusting the birthday accordingly. So, if it is
still not working for anyone, please provide the device information
(from the activesync properties screen) and the log showing the
contact being synched.
attempt to work around this bug. It relies on sniffing out the client
in use and adjusting the birthday accordingly. So, if it is still not
working for anyone, please provide the device information (from the
activesync properties screen) and the log showing the contact being
synched.
fields that should be supported by the protocol.
solution. But sometimes you have to be flexible to make users happy ...
AS is a bad protocol for dates, but if you can work around, that's fine. No?
State ⇒ Rejected
fields that should be supported by the protocol.
You should try it when you have multiple AS devices on the same
account, I have had instances of birthdays shifting up to 5 or 6 days
out :-O
A workaround or fix of some description for this would make my year.
Although blocking it sounds like a last resort! :)
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Block client update for bithday field
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
State ⇒ New
I know this is a known issue with most ActiveSync clients, but the
birtday offset issue is very annoying...
It would be useful to have an option to block the update from the clients.
The communication would be only from Server => Client and not from
Client => Server for this (a list?) field.
I'm aware it is a ... bad fix, but I try to please all my users.
If not, is there another workaround to do this ?
Ryu