diff --git a/site/src/api/api.ts b/site/src/api/api.ts index 8461c758bf692..7e50291a9b995 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -933,8 +933,10 @@ export const getTemplateDAUs = async ( }; export const getDeploymentDAUs = async ( - // Default to user's local timezone - offset = new Date().getTimezoneOffset() / 60, + // Default to user's local timezone. + // As /api/v2/insights/daus only accepts whole-number values for tz_offset + // we truncate the tz offset down to the closest hour. + offset = Math.trunc(new Date().getTimezoneOffset() / 60), ): Promise => { const response = await axios.get(`/api/v2/insights/daus?tz_offset=${offset}`); return response.data;