Closed
Description
Problem: if your timezone offset is a non-whole number of hours, the Deployment>DAUs chart will fail to load.
Steps to reproduce:
- Set your browser TZ to India/Mumbai or some other fractional-offset TZ
- Load Depoyment>DAUs
- Observe sadness
Bug is here: https://github.com/coder/coder/blob/main/site/src/api/api.ts#L937
This ends up sending a request /v2/insights/daus?tz_offset=5.5
which is not accepted by the BE.
IIRC the usage metrics are bucketed by hour, so we probably need to round down to the closest hour.