1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-23 00:16:25 +01:00
unleash.unleash/frontend/src
Thomas Heartman dadda7b648
fix: Data usage graphs don't work in UTC-n time zones (#9530)
Fixes a number of issues that would surface in UTC-n (where n > 1)
timezones. I've not found a way to check this with tests (and it looks
like [we weren't able to last time
either](https://github.com/Unleash/unleash/pull/9110/files#r1919746328)),
so all the testing's been done manually by adjusting my system time and
zone. (From what I understand, you can't generate a Date with a specific
TZ offset in JS: it's only utc or local time)

Resolved:
- [x] Selecting "Jan" in the dropdown results in the selection being
"December" (off by one in the selector)

- [x] Selecting a month view only gives you one data point (and it's
probably empty). Wrong date parsing on the way out resulted in sending
`{ from: "2025-02-28", to: "2025-02-28"}` instead of `{ from:
"2025-03-01", to: "2025-03-31"}`

- [x] The dates we create when making "daysRec" need to be adjusted.
They showed the wrong month, so the dates were off.

- [x] Make sure the labels are correct when hovering over. Again: we
used the wrong month for generating these.

- [x] The available months are wrong. Incorrect month parsing again.

- [x] The request summary month is wrong. You guessed it: incorrect
month parsing
2025-03-13 15:44:10 +01:00
..
__mocks__
assets chore: add release management to new in unleash (#9257) 2025-02-07 14:33:25 +00:00
component fix: Data usage graphs don't work in UTC-n time zones (#9530) 2025-03-13 15:44:10 +01:00
constants
contexts chore(unl-204): remove uses of toast text and confetti (#8941) 2024-12-10 13:38:04 +00:00
hooks feat: read backend connections UI (#9526) 2025-03-13 10:56:29 +02:00
interfaces Feat(UI): new strategy variant chips (#9507) 2025-03-13 11:27:45 +01:00
openapi chore: orval generation (#9524) 2025-03-12 16:47:55 +01:00
themes chore: deprecate envAccordion colors; update non-legacy components (#9378) 2025-02-27 15:29:37 +01:00
types
utils fix: Data usage graphs don't work in UTC-n time zones (#9530) 2025-03-13 15:44:10 +01:00
index.tsx
setupTests.ts
vite-env.d.ts