-
Notifications
You must be signed in to change notification settings - Fork 671
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
Data will be deleted on time zone change #89
Comments
how can I solve it ? |
I have it acting slightly differently. It just seems to reset the current date, then the next day goes huge. I can have a look at it once I stop travelling. |
I've just had this happen when I've traveled between timezones last week - each timezone change threw out the pedometer count for a day or so each side of the time the timezone change occurred. It doesn't correct when you change back to the original timezone in my experience. |
I think this problem might be caused by storing only daily counts, but with "today" depending on the local time zone. When you change timezones, "today" changes and weird things happen. One possible solution is to instead store step counts every 15 minutes, to account for every possible time zone offset. That way, you can always compute the "daily" step count based on the user's current timezone without making the database dependent on it. The DB size will grow much faster, but you'd still need to walk nonstop for 30 years before it hits a million rows. Your displayed step counts would change if you travel between timezones, but that's something that can be worked around if you also store the current timezone in the database for each row. @j4velin what do you think? |
When you travel around the world and your time zone changes, pedometer will delete all data and start from scratch.
The text was updated successfully, but these errors were encountered: