New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zephyrRemoteStoreDictionary[ZephyrSyncKey] reports incorrect time #29
Comments
[bump] After further testing, I've edited the issue report with the actual underlying problem. |
Hey. Thanks for the bug report! I'm wondering how large the discrepancy is. Would you be able to provide the sync times in two scenarios:
This is where the time is being set to values being set to the cloud - maybe it needs to be more stringent and formatted? |
I'm just following up on this issue. I have a 5 day rule - if an issue stays stale for 5 days, I close it for my own peace of mind. Thanks! |
Closing this issue due to lack of activity. |
Below is the time difference when a local change is made and is being sent up to iCloud: Despite the local change actually happening more recently, the date of the remote change is set ahead. Further testing with some print statements to the console shows that this difference can sometimes be as little as a second or two:
|
This seems like a difficult bug to track down... I thought maybe it had something to do with making changes rapidly and then needing to wait for those changes to get synced to iCloud. However, this doesn't seem to be the case. It happens fairly reliably (regardless of time waited) for every few updates sent to the cloud. The remote date is very elusive... any help would be appreciated. |
Hey @Sam-Spencer, at this point, I'll need to see a sample project so that I can potentially track this issue down. I only maintain Zephyr at this point as the project this was built for is no longer being developed. |
The date is set here: https://github.com/ArtSabintsev/Zephyr/blob/master/Sources/Zephyr.swift#L285 - I'm not sure what the system is doing to have you lose precision like that. Maybe you're calling I'm going to close the issue because I can't seem to reproduce it on my end nor can I see anything in the code that can be pointed to as the culprit. |
It appears that the date stored in
zephyrRemoteStoreDictionary[ZephyrSyncKey]
often supplies the incorrect time, thus causing data lost for the local store. Although I have yet to pinpoint the cause of the issue, this key fairly consistently (2 out of every 3 calls) reports a time that is ahead of the local time. Unfortunately, this means that when updating a default in the local store that is newer than the default stored remotely, the older remote value trumps the new local value.I will continue looking into the issue and see if I can find out any additional information. Hopefully we can get this fixed!
Thank you for this project - saved me a good chunk of time, and it's beautifully written! 🍻
The text was updated successfully, but these errors were encountered: