Acknowledged

UserProfile API returning incorrect sleepTime

I'm trying to get the user specified sleep time with the call:

var time = UserProfile.getProfile.sleepTime;

Unfortunately, the value returned does not match what is set on my Venu3.  If I set the sleep time to 12:00AM this API returns a Time.Duration representing 10:00PM.  I'm reasonably sure my code is correct because the sample app UserProfile exhibits the same error.

Note, this code and the UserProfile app both work correctly in the simulator, it's only on real hardware that there is a problem.

Parents
  • After some tests I think the bug is for devices with scheduling, so 10PM is the value you can't edit. Change 6:30 to something else and you will still see 6.30.

    I have f6 without scheduling (only one values independent of day) this values (A) is correctly returning from the user profile. 

    But f7 have ADDITIONAL the 7 pairs (B).

    System still reading data only from A and devices B doesn't update A for the current day.

Comment
  • After some tests I think the bug is for devices with scheduling, so 10PM is the value you can't edit. Change 6:30 to something else and you will still see 6.30.

    I have f6 without scheduling (only one values independent of day) this values (A) is correctly returning from the user profile. 

    But f7 have ADDITIONAL the 7 pairs (B).

    System still reading data only from A and devices B doesn't update A for the current day.

Children
  • For my f7 it doesn't work probably because I have 2 devices registered to the same profile.

    I've changed (on watch) sleep/wake for tomorrow, maybe watch refresh profile on midnight (after sync I can see new values in gcm).

  • Good catch.  I changed the sleep/wake time just for today (without setting them for the rest of the week) and now the API is returning the correct times (at least for today).  I'll have to wait until tomorrow to see if the API remains correct or not.

    Tnx for the insight.