Sync entries from device to server -> timezone
Opened this issue · 1 comments
Hello,
I'm using the last version of plop-reader with the last version of wallabag on a Touch HD Plus.
The function wallabag_api.syncEntriesToServer()
is not doing anything to the server (not telling the server that an article is now marked as read).
Is someone else experiencing the issue ?
In the logs, I juste have:
[2020:02:11 22:09:21][debug] API: syncEntriesToServer()
[2020:02:11 22:09:21][debug] API: syncEntriesToServer(): done
It seems that we never enter in the loop for (unsigned int i=0 ; i<changedEntries.size() ; i++) {
.
Maybe because of the function repository.findUpdatedLocallyMoreRecentlyThanRemotely(changedEntries);
?
If someone else is experiencing the issue, let me know :)
I will try to find an explanation why the changedEntries
are not correctly updated.
Okay, I may have found my issue.
In the database, local_updated_at > remote_updated_at
was not true because of timezones: my server is in CET timezone whereas the pocketbook (or plop reader) is in UTC/GMT.
I will provide a PR if I manage to deal properly with timezones.
Otherwise, I this is not a big deal if I'm patient between operations on the server and the pocketbook (at least one hour in winter).