mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Fixes incorrect handling of utc in timeEpic (#18386)
* Fix: Fixes incorrect handling of utc in timeEpic * Chore: Renames dateTimeFromTimeZone to dateTimeForTimeZone
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
isDateTime,
|
||||
dateTime,
|
||||
DateTime,
|
||||
toUtc,
|
||||
dateTimeForTimeZone,
|
||||
} from '@grafana/data';
|
||||
|
||||
export const rawToTimeRange = (raw: RawTimeRange, timeZone?: TimeZone): TimeRange => {
|
||||
@@ -32,11 +32,7 @@ export const stringToDateTimeType = (value: string | DateTime, roundUp?: boolean
|
||||
return parsed || dateTime();
|
||||
}
|
||||
|
||||
if (timeZone === 'utc') {
|
||||
return toUtc(value, TIME_FORMAT);
|
||||
}
|
||||
|
||||
return dateTime(value, TIME_FORMAT);
|
||||
return dateTimeForTimeZone(timeZone, value, TIME_FORMAT);
|
||||
};
|
||||
|
||||
export const mapTimeRangeToRangeString = (timeRange: RawTimeRange): string => {
|
||||
|
||||
Reference in New Issue
Block a user