-
Notifications
You must be signed in to change notification settings - Fork 195
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
Wrong Time Since Updating to 3.4 #107
Comments
same problem |
I have same problem on 3.3 version also |
same problem on 3.4, never noticed on below versions. |
i have same problem, but i solve it, u can try my solution may be u need check disk cache has been cleared when device reboot. because disk cache not cleared, in isTrueTimeCachedFromAPreviousBoot() state u maybe get false result. when TrueTime get isInitialized() return true in reboot state,(in this time, SNTP_CLIENT.wasInitialized() is false ), the TrueTime will get time from disk cache. but disk cache is old time. so, when u want request NTP sync in first time, don't forget clear disk cache. |
Happend with me on 2 devices when I am taking from Cache if it synced 1- Device time is correct but Truetime giving me wrong Date and Time
|
how to clear disk cache? I tried to call TrueTime.clearCachedInfo(),but it didn't work. |
my approach is copy SharedPreferenceCacheImpl.class to my project from trueTime lib. it just a sharedPreferences object. you can trace clearCachedInfo() method, and you will found it |
I am using version 3.5 and it sometimes gives wrong time. Can someone help me ? |
@binishmatheww I've stopped using the cache and I haven't had any issues since. The only sucky part is if the device is offline, then it won't work and you have to fallback to the device time. In an ideal scenario this library would work 100% of the time with caching for offline support. But I haven't been able to get it to be reliable. I think |
I am using the rx extensions library and just updated to 3.4 from 3.2. I recently shipped a new version of my app using TrueTime 3.4. Since that update I have had a lot of users complain that the recorded time is wrong. I also came across the issue once. It was January 7th 11:30 AM and TrueTime said it was January 4th 11:40 AM. I tried force closing the app and that didn't fix anything. I tried restarting my phone and that fixed the problem. I am using the shared preference cache option.
The text was updated successfully, but these errors were encountered: