diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 3d3eac0ade..43cb8263e1 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -174,6 +174,8 @@ import { applyColumnFormatter, buildColumnFormatterKey, defaultIoTDBTimestampFormatter, + DataGridDateTimePatterns, + displayTimeZoneOption, formatIoTDBTimestampEditorValue, getSupportedTimeZoneOptions, iotdbTimestampFractionDigits, @@ -184,7 +186,6 @@ import { type ColumnFormatterConfig, type DateTimeFormatterUnit, type ForeignKeyDisplayFilterConfig, - DateTimePatterns, } from "@/lib/dataGrid/columnFormatter"; import { temporalCellEditorConfig, type TemporalCellEditorConfig } from "@/lib/dataGrid/dataGridTemporalEditor"; import { BOOLEAN_CELL_EDITOR_VALUES, booleanCellEditorValue, isBooleanCellValue, isBooleanColumnType, isPointInBooleanCheckbox, nextBooleanCellValue, normalizeBooleanCellValue, parseBooleanCellEditorValue } from "@/lib/dataGrid/dataGridBooleanColumn"; @@ -12983,7 +12984,7 @@ function openGridSnapshot() { string[]; } +const TIME_ZONE_DISPLAY_ALIASES: Record = { + "Asia/Calcutta": "Asia/Kolkata", +}; + +export function displayTimeZoneOption(timeZone: string): string { + return TIME_ZONE_DISPLAY_ALIASES[timeZone] ?? timeZone; +} + export function getSupportedTimeZoneOptions(intl: IntlTimeZoneSupport, fallbackTimeZone = "UTC"): string[] { try { const timeZones = intl.supportedValuesOf?.("timeZone");