1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/frontend/src/utils
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
..
apiUtils.ts
arraysHaveSameItems.test.ts
arraysHaveSameItems.ts
calculatePercentage.ts
capitalizeFirst.ts
cleanConstraint.test.ts
cleanConstraint.ts
createFeatureStrategy.test.ts
createFeatureStrategy.ts
createLocalStorage.ts
cyclicIterator.test.ts
cyclicIterator.ts
deepOmit.test.ts
deepOmit.ts
env.test.ts
env.ts
formatAccessText.test.ts
formatAccessText.ts
formatConstraintValue.ts
formatDate.ts chore: implement event grouping in the event timeline (#8254) 2024-09-26 14:48:52 +01:00
formatPath.test.ts
formatPath.ts
formatUnknownError.test.ts
formatUnknownError.ts
getFeatureMetrics.ts feat: new environment box (#9342) 2025-02-25 10:34:36 +00:00
getFeatureTypeIcons.ts
instanceTrial.test.ts
instanceTrial.ts
nonEmptyArray.ts
objectId.test.ts
objectId.ts
oneOf.ts
operatorsForContext.ts
paginate.test.ts
paginate.ts
parseParameter.test.ts
parseParameter.ts
permissions.ts
projectFilterGenerator.ts
removeEmptyStringFields.test.ts
removeEmptyStringFields.ts
reorderObject.test.ts
reorderObject.ts
resizeScreen.ts test: onboarding test with existing key (#8116) 2024-09-06 11:50:52 +02:00
routePathHelpers.ts chore: remove create feature component (#7959) 2024-08-22 11:30:41 +03:00
search.ts
serializeQueryParams.ts
sortStrategyParameters.test.ts
sortStrategyParameters.ts
sortTypes.test.ts
sortTypes.ts
storage.test.ts
storage.ts
strategyNames.tsx chore: update release plans icon (#8894) 2024-12-02 11:51:18 +00:00
testIds.ts
testRenderer.tsx chore: remove frontendHeaderRedesign flag (#9428) 2025-03-05 09:40:53 +01:00
testServer.ts test: reduce noise from test warnings (#8251) 2024-09-25 12:56:09 +02:00
traffic-calculations.test.ts chore: remove dataUsageMultiMonthView flag (#9429) 2025-03-05 12:08:33 +01:00
traffic-calculations.ts fix: Data usage graphs don't work in UTC-n time zones (#9530) 2025-03-13 15:44:10 +01:00
unique-change-request-id.ts
unique.ts
unknownify.ts
validateParameterValue.test.ts
validateParameterValue.ts
variants.ts
withTableState.test.tsx
withTableState.ts