The Date().getTime in syncFunc reuturns wrong time. This is a bug in otto library. I have filed an issue here. But this looks like a major issue to me.
Could you file an issue against couchbase/sync_gateway on Github, please? (And reference the Otto bug.) Thanks!
Done @jens. Its here.