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
+1 -1
View File
@@ -22,7 +22,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/daus \
"entries": [
{
"amount": 0,
"date": "2019-08-24T14:15:22Z"
"date": "string"
}
],
"tz_hour_offset": 0
+6 -6
View File
@@ -1931,16 +1931,16 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
```json
{
"amount": 0,
"date": "2019-08-24T14:15:22Z"
"date": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| -------- | ------- | -------- | ------------ | ----------- |
| `amount` | integer | false | | |
| `date` | string | false | | |
| Name | Type | Required | Restrictions | Description |
| -------- | ------- | -------- | ------------ | ---------------------------------------------------------------------------------------- |
| `amount` | integer | false | | |
| `date` | string | false | | Date is a string formatted as 2024-01-31. Timezone and time information is not included. |
## codersdk.DAUsResponse
@@ -1949,7 +1949,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"entries": [
{
"amount": 0,
"date": "2019-08-24T14:15:22Z"
"date": "string"
}
],
"tz_hour_offset": 0
+1 -1
View File
@@ -842,7 +842,7 @@ curl -X GET http://coder-server:8080/api/v2/templates/{template}/daus \
"entries": [
{
"amount": 0,
"date": "2019-08-24T14:15:22Z"
"date": "string"
}
],
"tz_hour_offset": 0