@@ -6,7 +6,19 @@ export const DEFAULT_DATE_SETTING_DATE = 'medium';
66export const DATE_SETTING_TIMEZONE_SHORT = 'utmstack.time.zone' ;
77export const DATE_SETTING_FORMAT_SHORT = 'utmstack.time.dateformat' ;
88
9- export const TIMEZONES : Array < { label : string ; timezone : string , zone : string } > = [
9+ export const TIMEZONES : Array < { label : string ; timezone : string ; zone : string } > =
10+ moment . tz . names ( ) . map ( ( tz ) => {
11+ const parts = tz . split ( '/' ) ;
12+ const zone = parts [ 0 ] || 'Other' ;
13+ const label = tz . replace ( / _ / g, ' ' ) ;
14+ return {
15+ label,
16+ timezone : tz ,
17+ zone
18+ } ;
19+ } ) ;
20+
21+ /*export const TIMEZONES: Array<{ label: string; timezone: string, zone: string }> = [
1022 {label: 'UTC', timezone: 'UTC', zone: 'UTC'},
1123 {label: 'Eastern Standard Time (New York)', timezone: 'America/New_York', zone: 'America'},
1224 {label: 'Pacific Standard Time (Los Angeles)', timezone: 'America/Los_Angeles', zone: 'America'},
@@ -38,7 +50,7 @@ export const TIMEZONES: Array<{ label: string; timezone: string, zone: string }>
3850 {label: 'Jerusalem (IST)', timezone: 'Asia/Jerusalem', zone: 'Asia'},
3951 {label: 'Buenos Aires (ART)', timezone: 'America/Argentina/Buenos_Aires', zone: 'America'},
4052 {label: 'São Paulo (BRT)', timezone: 'America/Sao_Paulo', zone: 'America'},
41- ] ;
53+ ];*/
4254export const DATE_FORMATS : Array < { label : string ; format : string ; equivalentTo : string } > = [
4355 { label : 'Short' , format : 'short' , equivalentTo : 'M/d/yy, h:mm a' } ,
4456 { label : 'Medium' , format : 'medium' , equivalentTo : 'MMM d, y, h:mm:ss a' } ,
0 commit comments