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

myplanet used time calculation giving wrong time #6406

Open
lmmrssa opened this issue May 27, 2020 · 3 comments
Open

myplanet used time calculation giving wrong time #6406

lmmrssa opened this issue May 27, 2020 · 3 comments

Comments

@lmmrssa
Copy link
Member

lmmrssa commented May 27, 2020

image

@paulbert
Copy link
Member

@lmmrssa Yes I asked Leonard what the fields are but forgot to bring it up in the meeting yesterday.

I assumed totalUsed was the seconds or milliseconds of time for that session, but that is clearly incorrect so if you or @leomaxi could explain better in this issue that would be very helpful.

@lmmrssa
Copy link
Member Author

lmmrssa commented May 27, 2020

totalUsed is tracking milliseconds of how long device was on in that specific period (day).
totalForegroundTime is how long myplanet was used
We saw there was some issue coming from myplanet when calculating data as phone was not returning lastTimeUsed causing time to be negative.
We have raised issue on myPlanet so they put zero if there is negative value. On planet side we need to either cleanup old data with negative totalUsed value or we need to ignore them when doing sum.

@paulbert
Copy link
Member

@lmmrssa The values for totalUsed and totalForegroundTime is still very strange. Here's an example on Planet Dev where the difference in the two objects for totalUsed is 460578ms and totalForegroundTime is 283111ms but the difference in time is 7ms. If the record is created on the same day could there be some overlap?

image

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

No branches or pull requests

2 participants