From 8e3b5dce7672fb6a908bf1a539ebceba4d050788 Mon Sep 17 00:00:00 2001 From: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com> Date: Tue, 29 Mar 2022 12:23:37 +0100 Subject: [PATCH] Grafana-UI: Fixes timezone offset for default timezone when it is different from browser timezone (#46796) --- .../TimeZonePicker/TimeZoneOption.tsx | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeZonePicker/TimeZoneOption.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeZonePicker/TimeZoneOption.tsx index 4ee68fd73fd..cfe89819af9 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeZonePicker/TimeZoneOption.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeZonePicker/TimeZoneOption.tsx @@ -33,16 +33,24 @@ export const WideTimeZoneOption: React.FC> = (props, re return null; } + const timeZoneInfo = getTimeZoneInfo(data.value, timestamp); + return (
- +
- + {isSelected && ( @@ -65,6 +73,8 @@ export const CompactTimeZoneOption: React.FC> = (props, return null; } + const timeZoneInfo = getTimeZoneInfo(data.value, timestamp); + return (
@@ -82,10 +92,16 @@ export const CompactTimeZoneOption: React.FC> = (props,
- +
- +