Request times are written to traffic_logs.created_at as Go's own rendering of a time.Time (internal/traffic/db.go:76 binds the value straight through), which produces 2026-07-15 19:07:56.357597184 +0100 WAT m=+0.002158540, monotonic clock reading and all. SQLite cannot parse that, so strftime('%s', created_at) returns NULL and any date arithmetic on the column silently yields nothing rather than failing loudly. The column is declared DATETIME (internal/traffic/db.go:50), so this is not the format anything reading the schema would expect.
The existing filters survive only because both sides of a comparison are rendered the same way and the leading wall clock sorts correctly: GetLogs and GetStats compare text, not time. The offset suffix takes no part in that, so times either side of an offset change compare by wall clock rather than by instant, and no query can bucket, extract or convert the column at all.
Constraint: the storage format and the queries that compare against it have to change together. Both sides currently render through the same driver path, so correcting one alone breaks the comparison that works today.
Checklist
Related
Request times are written to
traffic_logs.created_atas Go's own rendering of atime.Time(internal/traffic/db.go:76binds the value straight through), which produces2026-07-15 19:07:56.357597184 +0100 WAT m=+0.002158540, monotonic clock reading and all. SQLite cannot parse that, sostrftime('%s', created_at)returns NULL and any date arithmetic on the column silently yields nothing rather than failing loudly. The column is declaredDATETIME(internal/traffic/db.go:50), so this is not the format anything reading the schema would expect.The existing filters survive only because both sides of a comparison are rendered the same way and the leading wall clock sorts correctly:
GetLogsandGetStatscompare text, not time. The offset suffix takes no part in that, so times either side of an offset change compare by wall clock rather than by instant, and no query can bucket, extract or convert the column at all.Constraint: the storage format and the queries that compare against it have to change together. Both sides currently render through the same driver path, so correcting one alone breaks the comparison that works today.
Checklist
created_at.Related