getCurrentTimeMs() return the wrong date time everytime I manually change the device clock
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 287
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
If I do something like:
- Open my app
- Minimize it and go to System > Date & Time and then change the device clock for some wrong date & time
- Then come back to my app and try to call `getCurrentTimeMs() ` this will give me the wrong date that I manually setup
If I have an internet connection, after that wrong response the next one works as expected, giving me the right date & time.
If that is expected behavior could you please explain a little bit more why this happens? And what do you recommend to minimize that behavior?
I am now calling `kronosClock.syncInBackground();` every time my app goes to the foreground, please let me know if there is any other better strategy to deal with it.
Thank you in advance, and congrats for the work, apart from that minor issue this library is great!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior around getCurrentTimeMs() after changing the device clock, then inspect the syncInBackground() entry point used when the app returns to the foreground. Done means determining whether the result is expected and documenting or defining a recommended strategy for handling clock changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100