Improved autosync logic to be independent of server time