/api/analytics/usage grouped sessions with date(started_at, 'unixepoch'),
which is the UTC calendar day. The Desktop Command Center and the web
Analytics page show that string as a calendar date, and the CLI /insights
command buckets the same sessions by the machine's local day
(datetime.fromtimestamp in agent/insights.py). For a user east of UTC, a
session started at 02:00 IST was counted on the previous day.
Add SQLite's 'localtime' modifier so the day is the machine-local day,
the same one /insights uses. SQLite applies it per row through the C
library, so each session gets the UTC offset in force at its own start
time and the buckets stay correct across a DST change.
Refs #23982