fix: strip timezone information from a date in dau response (#11962)

* fix: strip timezone information from a date in dau response

Timezone information is lost, so do not forward it to the client.

* fix: timezone offset should be flipped
* Make tests deterministic
This commit is contained in:
Steven Masley
2024-01-31 16:01:50 -06:00
committed by GitHub
parent 76e73287a5
commit ac64155282
12 changed files with 111 additions and 67 deletions
+6 -6
View File
@@ -21,17 +21,17 @@ export const MockOrganization: TypesGen.Organization = {
export const MockTemplateDAUResponse: TypesGen.DAUsResponse = {
tz_hour_offset: 0,
entries: [
{ date: "2022-08-27T00:00:00Z", amount: 1 },
{ date: "2022-08-29T00:00:00Z", amount: 2 },
{ date: "2022-08-30T00:00:00Z", amount: 1 },
{ date: "2022-08-27", amount: 1 },
{ date: "2022-08-29", amount: 2 },
{ date: "2022-08-30", amount: 1 },
],
};
export const MockDeploymentDAUResponse: TypesGen.DAUsResponse = {
tz_hour_offset: 0,
entries: [
{ date: "2022-08-27T00:00:00Z", amount: 10 },
{ date: "2022-08-29T00:00:00Z", amount: 22 },
{ date: "2022-08-30T00:00:00Z", amount: 14 },
{ date: "2022-08-27", amount: 10 },
{ date: "2022-08-29", amount: 22 },
{ date: "2022-08-30", amount: 14 },
],
};
export const MockSessionToken: TypesGen.LoginWithPasswordResponse = {