CMMotionActivityManager: past activities move in time between queries (watchOS 27, Apple Watch Ultra 4)

When I query the same past period with CMMotionActivityManager.queryActivityStarting(from:to:to:) at two different times, the second result contains the same activities, but their startDate values are earlier.

Setup

  • Apple Watch Ultra 4 (Watch8,1), watchOS 27.0.1
  • My app reads the activity history a few minutes after it happens and stores it.
  • Later it queries the same period again and compares the results.

What I see

The activity types and durations do not change. Whole blocks of history move back in time by a constant offset. Example from today's query, compared with the stored values:

Period of the dataOffset
Nov 8, 12:47 – 19:55−155 s
Nov 8, 19:57 – Nov 9, 17:18−95 s
Nov 9, 17:19 – now0 s
  • Yesterday at 17:19, the same Nov 8 evening data had an offset of 0 s. So the offset changes over time, not only with the age of the data.
  • New steps add up: when a step occurs, all older history moves back by the same amount.
  • Earlier I saw offsets of −60 s, −123 s, −177 s and −340 s.
  • The stored values match HealthKit workout start and end times within about 8 s. The re-queried values do not (for example −52 s at the start of a run).
  • timestamp of these activities is equal to startDate (seconds since 2001), so it does not help to match them.
  • I did not see this on Apple Watch Ultra 3 with watchOS 27, but I have only one comparison from that watch.

Questions

  1. Is startDate of a past CMMotionActivity expected to stay the same?
  2. If not, which event changes it, and is there a way to detect it?
  3. What is the recommended way to get stable times from the activity history?

I log every query on the watch (all activities plus clock and battery state every 30 minutes), so I can share data or a sysdiagnose. I will also file a Feedback.