Skip to content
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

Open
sedrubal opened this issue Sep 6, 2016 · 6 comments
Open

Data will be deleted on time zone change #89

sedrubal opened this issue Sep 6, 2016 · 6 comments
Labels

Comments

@sedrubal
Copy link

sedrubal commented Sep 6, 2016

When you travel around the world and your time zone changes, pedometer will delete all data and start from scratch.

@j4velin j4velin added the bug label Apr 23, 2017
@liu402883451
Copy link

how can I solve it ?

@Dannysw
Copy link

Dannysw commented Jul 28, 2017

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.

@scrunchy
Copy link

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.

@miiichael
Copy link

I am also experienced this bug.

screenshot_2018-01-27-01-27-11

I was airborne while crossing midnight, leaving UTC+08 and arriving in UTC+11.

@miiichael
Copy link

Huh, even weirder, my Wednesday stats have now disappeared altogether.
screenshot_2018-01-27-01-54-25

@puddly
Copy link

puddly commented Feb 25, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants