WP 9c Phase 1 #12
|
|
@ -545,11 +545,12 @@ async def import_apple_health_sleep(
|
||||||
night['awake_minutes']
|
night['awake_minutes']
|
||||||
)
|
)
|
||||||
|
|
||||||
# Prepare JSONB segments
|
# Prepare JSONB segments with full datetime
|
||||||
sleep_segments = [
|
sleep_segments = [
|
||||||
{
|
{
|
||||||
'phase': seg['phase'],
|
'phase': seg['phase'],
|
||||||
'start': seg['start'].strftime('%H:%M'),
|
'start': seg['start'].isoformat(), # Full datetime: 2026-03-21T22:30:00
|
||||||
|
'end': seg['end'].isoformat(), # Full datetime: 2026-03-21T23:15:00
|
||||||
'duration_min': seg['duration_min']
|
'duration_min': seg['duration_min']
|
||||||
}
|
}
|
||||||
for seg in night['segments']
|
for seg in night['segments']
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user