mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
Date a workout by the user's timezone on the detail endpoint
The detail payload carried the session's start timestamp but nothing that said which local day it belongs to. Anything that wants the day around a workout had to slice the ISO string, which is the browser's day, not the person's: a 20:00 UTC session reads as the 15th in London and the 16th in Auckland. Resolve the day server-side from the user's timezone and ship it as dayKey. Additive, so a native client that does not read it is untouched.
This commit is contained in:
1 parent
a4cffbbea5
commit
0094445f07
5 files changed
+70
-1
No files matched your search
@@ -19968,6 +19968,8 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
|
||||
dayKey:
|
||||
type: string
|
||||
durationSec:
|
||||
type: integer
|
||||
minimum: 0
|
||||
@@ -20076,6 +20078,7 @@ components:
|
||||
- sportType
|
||||
- startedAt
|
||||
- endedAt
|
||||
- dayKey
|
||||
- durationSec
|
||||
- distanceM
|
||||
- activeEnergyKcal
|
||||
|
||||
Reference in new issue
Block a user