11-28-2017 00:29 - edited 11-28-2017 00:31
11-28-2017 00:29 - edited 11-28-2017 00:31
Hi there,
We are trying to integrate Fitbit into our App and the start time of the manually tracked log is wrong for iPhone log. The Fitbit clients on both platform are all up-to-date.
I am currently in timezone +8 and you can see the start time is "startTime": "2017-11-28T15:26:00.000Z" for iPhone log, and "startTime": "2017-11-28T15:39:00.000+08:00" for Android log. And I had input them almost at the same time using the same Fitbit account. With the values like these, we are not able to merge these logs with our data.
For resolution, we have thought about treating iOS log differently from Android logs but it is definitely not the most beautiful solution for timezone issue. Anything you could help with?
I had attached two complete logs below, the first one is from iPhone manually tracked log and the second is from Android.
{ "activeDuration": 1800000, "activityLevel": [ { "minutes": 0, "name": "sedentary" }, { "minutes": 30, "name": "lightly" }, { "minutes": 0, "name": "fairly" }, { "minutes": 0, "name": "very" } ], "activityName": "Walk", "activityTypeId": 90013, "calories": 82, "caloriesLink": "https://api.fitbit.com/1/user/-/activities/calories/date/2017-11-28/2017-11-28/1min/time/15:26/15:56.json", "distance": 1.2, "distanceUnit": "Kilometer", "duration": 1800000, "elevationGain": 0, "lastModified": "2017-11-28T07:56:20.000Z", "logId": 11027679464, "logType": "manual", "manualValuesSpecified": { "calories": false, "distance": true, "steps": false }, "originalDuration": 1800000, "originalStartTime": "2017-11-28T15:26:00.000Z", "pace": 1500, "source": { "id": "228TSL", "name": "Fitbit for iPhone", "type": "app", "url": "https://www.fitbit.com/iphone" }, "speed": 2.4, "startTime": "2017-11-28T15:26:00.000Z", "steps": 1560 }
Android log
{ "activeDuration": 1800000, "activityLevel": [ { "minutes": 0, "name": "sedentary" }, { "minutes": 30, "name": "lightly" }, { "minutes": 0, "name": "fairly" }, { "minutes": 0, "name": "very" } ], "activityName": "Walk", "activityTypeId": 90013, "calories": 82, "caloriesLink": "https://api.fitbit.com/1/user/-/activities/calories/date/2017-11-28/2017-11-28/1min/time/15:39/16:09.json", "distance": 1, "distanceUnit": "Kilometer", "duration": 1800000, "elevationGain": 0, "lastModified": "2017-11-28T08:09:46.000Z", "logId": 11107134287, "logType": "manual", "manualValuesSpecified": { "calories": true, "distance": true, "steps": false }, "originalDuration": 1800000, "originalStartTime": "2017-11-28T15:39:00.000+08:00", "pace": 1800, "source": { "id": "228VSR", "name": "Fitbit for Android", "type": "app", "url": "https://www.fitbit.com/android" }, "speed": 2, "startTime": "2017-11-28T15:39:00.000+08:00", "steps": 1453 }
Thanks,
Lei
Answered! Go to the Best Answer.
12-04-2017 18:10
12-04-2017 18:10
You may have found a bug in one of our mobile apps. We are looking into the issue.
11-28-2017 17:02
11-28-2017 17:02
To be sure I understand your problem, when you manually log an activity *for the same user* on two devices (1 Android, 1 iOS) you get different start times?
From what I can see the start time for activity logged on iOS is
2017-11-28T15:26:00.000Z
this is time is incorrect as it should be +8:00
and the start time for the activity logged on Android is shown as
2017-11-28T15:39:00.000+08:00
this time is correct.
For clarity, what is the exact API request you are making to access these logs?
Thanks,
Chris
11-29-2017 03:21
11-29-2017 03:21
12-04-2017 18:10
12-04-2017 18:10
You may have found a bug in one of our mobile apps. We are looking into the issue.
12-04-2017 20:49
12-04-2017 20:49
Great, thank you Chris!