{"action":"created","issue":{"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/11","labels_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/11/comments","events_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/11/events","html_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/11","id":51963538,"number":11,"title":"[sociald] Use server timestamps when delta-syncing google calendar event...","user":{"login":"antseppa","id":2151457,"avatar_url":"https://avatars.githubusercontent.com/u/2151457?v=3","gravatar_id":"","url":"https://api.github.com/users/antseppa","html_url":"https://github.com/antseppa","followers_url":"https://api.github.com/users/antseppa/followers","following_url":"https://api.github.com/users/antseppa/following{/other_user}","gists_url":"https://api.github.com/users/antseppa/gists{/gist_id}","starred_url":"https://api.github.com/users/antseppa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antseppa/subscriptions","organizations_url":"https://api.github.com/users/antseppa/orgs","repos_url":"https://api.github.com/users/antseppa/repos","events_url":"https://api.github.com/users/antseppa/events{/privacy}","received_events_url":"https://api.github.com/users/antseppa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-12-15T09:15:51Z","updated_at":"2015-01-13T12:18:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/11","html_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/11","diff_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/11.diff","patch_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/11.patch"},"body":"...s\r\n\r\nGoogle calendar sync plugin uses timestamp from previous completed buteo sync\r\nround when requesting events for delta sync. This causes problems if the\r\ndevice clock is behind the server clock. Say the following takes place:\r\nuser creates an event on device, upsyncs it at which point the sync plugin\r\nsaves a local timestamp. Then user edits the same event and saves it,\r\nwhich triggers sync. Sync plugin requests changed events by using the timestamp\r\nfrom previous round. As that timestamp is behind the server clock, the response\r\nalso includes the event user just edited. Sync plugin thinks that both\r\nlocal and server side versions of the event have changed.\r\nIn that case, the server side version wins, effectively canceling the\r\nchanges user just did.\r\n\r\nThis commit takes timestamps from server responses, stores them\r\nper-calendar basis to libsocialcache database and uses those values when\r\nrequesting events for delta sync."},"comment":{"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/comments/69736379","html_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/11#issuecomment-69736379","issue_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/11","id":69736379,"user":{"login":"antseppa","id":2151457,"avatar_url":"https://avatars.githubusercontent.com/u/2151457?v=3","gravatar_id":"","url":"https://api.github.com/users/antseppa","html_url":"https://github.com/antseppa","followers_url":"https://api.github.com/users/antseppa/followers","following_url":"https://api.github.com/users/antseppa/following{/other_user}","gists_url":"https://api.github.com/users/antseppa/gists{/gist_id}","starred_url":"https://api.github.com/users/antseppa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antseppa/subscriptions","organizations_url":"https://api.github.com/users/antseppa/orgs","repos_url":"https://api.github.com/users/antseppa/repos","events_url":"https://api.github.com/users/antseppa/events{/privacy}","received_events_url":"https://api.github.com/users/antseppa/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T12:18:19Z","updated_at":"2015-01-13T12:18:19Z","body":"...or, since there is a per-account QSetting file, start to maintain plugin version number in it and force clean sync if it has increased."}}