File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/settings/components/general Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ import {
99 timezonePreferenceFromPickerValue ,
1010} from '@/app/workspace/[workspaceId]/settings/components/general/timezone-picker'
1111
12- const timezoneOptions = [ { label : 'Los Angeles' , value : 'America/Los_Angeles' } ]
12+ const timezoneOptions = [ { label : 'Los Angeles (GMT-07:00) ' , value : 'America/Los_Angeles' } ]
1313
1414describe ( 'getTimezonePickerPresentation' , ( ) => {
1515 it ( 'shows an unset preference as an explicit browser-managed option' , ( ) => {
1616 expect ( getTimezonePickerPresentation ( null , 'America/Los_Angeles' , timezoneOptions ) ) . toEqual ( {
1717 value : AUTO_TIMEZONE_OPTION_VALUE ,
1818 options : [
19- { label : 'Auto: America/Los_Angeles ' , value : AUTO_TIMEZONE_OPTION_VALUE } ,
19+ { label : 'Auto: Los Angeles (GMT-07:00) ' , value : AUTO_TIMEZONE_OPTION_VALUE } ,
2020 ...timezoneOptions ,
2121 ] ,
2222 } )
Original file line number Diff line number Diff line change @@ -24,13 +24,16 @@ export function getTimezonePickerPresentation(
2424 : null
2525 const safeInvalidTimezone =
2626 savedTimezone === null ? '' : sanitizeTimezoneForDisplay ( savedTimezone )
27+ const browserTimezoneLabel =
28+ timezoneOptions . find ( ( option ) => option . value === browserTimezone ) ?. label ??
29+ sanitizeTimezoneForDisplay ( browserTimezone )
2730
2831 return {
2932 value : hasInvalidTimezone
3033 ? INVALID_TIMEZONE_OPTION_VALUE
3134 : ( savedTimezone ?? AUTO_TIMEZONE_OPTION_VALUE ) ,
3235 options : [
33- { label : `Auto: ${ browserTimezone } ` , value : AUTO_TIMEZONE_OPTION_VALUE } ,
36+ { label : `Auto: ${ browserTimezoneLabel } ` , value : AUTO_TIMEZONE_OPTION_VALUE } ,
3437 ...( hasInvalidTimezone
3538 ? [
3639 {
You can’t perform that action at this time.
0 commit comments