mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user