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
@@ -10,7 +10,7 @@ import { useAddonStore } from '../../../store/addonStore'
import { entityGradient } from '../../../utils/gradients'
import { useCurrencyConverter } from '../../../components/Dashboard/useCurrencyConverter'
import { useCollectionLists } from '../../../components/Dashboard/useCollectionLists'
import { shortZone, useDashboardTimezones } from '../../../components/Dashboard/useDashboardTimezones'
import { shortZone, useDashboardTimezones, zoneOptionLabel } from '../../../components/Dashboard/useDashboardTimezones'
import { formatTime, splitReservationDateTime } from '../../../utils/formatters'
import { normalizeAppearance, MOBILE_DASH_TOKENS, type MobileDashToken } from '@trek/shared'
import { MOMENT_LABEL, upcomingKey, type UpcomingReservation } from '../../../pages/dashboard/dashboardModel'
@@ -231,7 +231,7 @@ function MTimezonesWidget(): React.ReactElement {
>
<option value="" disabled>{t('dashboard.tz.searchPlaceholder')}</option>
{allZones.filter(z => !zones.includes(z)).map(z => (
<option key={z} value={z}>{z.replace(/_/g, ' ')}</option>
<option key={z} value={z}>{zoneOptionLabel(z)}</option>
))}
</select>
)}