From e6f3f3b4b40a490d5cb050471baa0999366dab2a Mon Sep 17 00:00:00 2001 From: Serhii Zghama Date: Wed, 25 Mar 2026 16:39:50 +0700 Subject: [PATCH] fix: use settings timezone in revenue chart date range The revenue chart was using the browser's local timezone instead of the timezone configured in Umami settings. This caused the chart to show different time boundaries than the stats shown in the header (total, average, transactions). The fix mirrors the same pattern used by EventsChart: pass timezone from useTimezone() into useDateRange() so that parseDateRange() computes start/end dates relative to the correct timezone. Fixes #4107 --- .../websites/[websiteId]/(reports)/revenue/RevenuePage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/(reports)/revenue/RevenuePage.tsx b/src/app/(main)/websites/[websiteId]/(reports)/revenue/RevenuePage.tsx index 3e429c187..4dc19e012 100644 --- a/src/app/(main)/websites/[websiteId]/(reports)/revenue/RevenuePage.tsx +++ b/src/app/(main)/websites/[websiteId]/(reports)/revenue/RevenuePage.tsx @@ -1,13 +1,14 @@ 'use client'; import { Column } from '@umami/react-zen'; import { WebsiteControls } from '@/app/(main)/websites/[websiteId]/WebsiteControls'; -import { useDateRange } from '@/components/hooks'; +import { useDateRange, useTimezone } from '@/components/hooks'; import { Revenue } from './Revenue'; export function RevenuePage({ websiteId }: { websiteId: string }) { + const { timezone } = useTimezone(); const { dateRange: { startDate, endDate, unit }, - } = useDateRange(); + } = useDateRange({ timezone }); return (