mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
fix chart and timezone issues, pass consistent dates to DB.
Closes #3700
This commit is contained in:
parent
81bedec6d5
commit
6751bf88bb
10 changed files with 157 additions and 79 deletions
|
|
@ -5,13 +5,13 @@ export function useDateParameters() {
|
|||
const {
|
||||
dateRange: { startDate, endDate, unit },
|
||||
} = useDateRange();
|
||||
const { timezone, toUtc, canonicalizeTimezone } = useTimezone();
|
||||
const { timezone, localToUtc, canonicalizeTimezone } = useTimezone();
|
||||
|
||||
return {
|
||||
startAt: +toUtc(startDate),
|
||||
endAt: +toUtc(endDate),
|
||||
startDate: toUtc(startDate).toISOString(),
|
||||
endDate: toUtc(endDate).toISOString(),
|
||||
startAt: +localToUtc(startDate),
|
||||
endAt: +localToUtc(endDate),
|
||||
startDate: localToUtc(startDate).toISOString(),
|
||||
endDate: localToUtc(endDate).toISOString(),
|
||||
unit,
|
||||
timezone: canonicalizeTimezone(timezone),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue