nemomobile/buteo-sync-plugins-social — pull request #11 by antseppa (2014-12-15 09:15:51+00:00)
Title: [sociald] Use server timestamps when delta-syncing google calendar event...

...s

Google calendar sync plugin uses timestamp from previous completed buteo sync
round when requesting events for delta sync. This causes problems if the
device clock is behind the server clock. Say the following takes place:
user creates an event on device, upsyncs it at which point the sync plugin
saves a local timestamp. Then user edits the same event and saves it,
which triggers sync. Sync plugin requests changed events by using the timestamp
from previous round. As that timestamp is behind the server clock, the response
also includes the event user just edited. Sync plugin thinks that both
local and server side versions of the event have changed.
In that case, the server side version wins, effectively canceling the
changes user just did.

This commit takes timestamps from server responses, stores them
per-calendar basis to libsocialcache database and uses those values when
requesting events for delta sync.