Git Product home page Git Product logo

Comments (6)

liu402883451 avatar liu402883451 commented on July 17, 2024

how can I solve it ?

from pedometer.

Dannysw avatar Dannysw commented on July 17, 2024

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.

from pedometer.

scrunchy avatar scrunchy commented on July 17, 2024

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.

from pedometer.

miiichael avatar miiichael commented on July 17, 2024

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.

from pedometer.

miiichael avatar miiichael commented on July 17, 2024

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

from pedometer.

puddly avatar puddly commented on July 17, 2024

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?

from pedometer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.