8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 651d14e commit 8441c36Copy full SHA for 8441c36
site/src/api/api.ts
@@ -933,8 +933,10 @@ export const getTemplateDAUs = async (
933
};
934
935
export const getDeploymentDAUs = async (
936
- // Default to user's local timezone
937
- offset = new Date().getTimezoneOffset() / 60,
+ // Default to user's local timezone.
+ // As /api/v2/insights/daus only accepts whole-number values for tz_offset
938
+ // we truncate the tz offset down to the closest hour.
939
+ offset = Math.trunc(new Date().getTimezoneOffset() / 60),
940
): Promise<TypesGen.DAUsResponse> => {
941
const response = await axios.get(`/api/v2/insights/daus?tz_offset=${offset}`);
942
return response.data;
0 commit comments