fix(dashboard): name Etc/GMT world clocks by their real offset

An Etc/GMT zone counts westward as positive, so Etc/GMT-4 is four hours ahead of UTC. The clock's title and the zone picker printed the id's own sign, and someone who picked GMT+4 got a clock four hours behind UTC; both now read the real offset, on the desktop and the phone.

Closes #3175
This commit is contained in:
Maurice
2026-11-23 19:42:40 +01:00
parent c8adf6e1da
commit 07eeae8486
4 changed files with 39 additions and 5 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ import { IcsSubscribeModal } from '../components/Planner/IcsSubscribeModal'
import CollectionsWidget from '../components/Dashboard/CollectionsWidget'
import { useCurrencyConverter } from '../components/Dashboard/useCurrencyConverter'
import { useDashboardPlugins } from '../components/Dashboard/useDashboardPlugins'
import { shortZone, useDashboardTimezones } from '../components/Dashboard/useDashboardTimezones'
import { shortZone, useDashboardTimezones, zoneOptionLabel } from '../components/Dashboard/useDashboardTimezones'
import PluginWidgets from '../components/Plugins/PluginWidgets'
import PluginFrame from '../components/Plugins/PluginFrame'
import { TripCardBadges } from '../components/Plugins/TripCardBadges'
@@ -701,7 +701,7 @@ function TimezoneTool({ locale }: { locale: string }): React.ReactElement {
const tzOptions = allZones
.filter(z => !zones.includes(z))
.map(z => ({ value: z, label: z.replace(/_/g, ' '), searchLabel: z }))
.map(z => ({ value: z, label: zoneOptionLabel(z), searchLabel: `${z} ${zoneOptionLabel(z)}` }))
return (
<div className="tool">