Giter Site home page Giter Site logo

Comments (5)

SheriefAlaa avatar SheriefAlaa commented on July 18, 2024

All dates are in UTC. I even generated dates at server side and passed them to fitkit and it somehow doesn't fetch specific activities within an hour range.

from fitkit.

krokyze avatar krokyze commented on July 18, 2024

Hey @SheriefAlaa did you found out what's the issue?

from fitkit.

SheriefAlaa avatar SheriefAlaa commented on July 18, 2024

Hey @SheriefAlaa did you found out what's the issue?

Not in an optimal way. After digging deep into the Swift/Android code of the plugin, I have discovered that calling read with from/to dates that include timezone info is pretty useless because the plugin will not care about this since it uses Unix epochs.

What was a even bigger surprise that returned data dates were in local device time that did not carry timezone info too which in the end forced me to save dates without timezone.

Maybe there should be a line in the readme that warns users about this?

Thank you.

from fitkit.

SheriefAlaa avatar SheriefAlaa commented on July 18, 2024

@krokyze ^

from fitkit.

krokyze avatar krokyze commented on July 18, 2024

@SheriefAlaa unix epochs are timezone independent so calling read with from/to dates that include timezone info is not useless. Also returned DateTime is in local device time with timezone included.

The issue in your query is that for DateTime.parse("11/11/2019 11:39:00") you didn't add UTC time zone like this "11/11/2019 11:39:00z".

from fitkit.

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.