File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
components/utm/config/app-config-sections Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,12 @@ <h6 class="font-weight-semibold mb-2">{{section.section | titlecase}}</h6>
103103 [loadingText] ="'Loading Timezones...' "
104104 [loading] ="!timezones "
105105 groupBy ="zone "
106- bindLabel ="label "
107106 bindValue ="timezone "
108107 [(ngModel)] ="conf.confParamValue "
109108 id ="timezoneSetting ">
109+ < ng-template ng-option-tmp ng-label-tmp let-item ="item ">
110+ ({{ item.timezone | timezoneOffset }}) {{ item.label }}
111+ </ ng-template >
110112
111113 </ ng-select >
112114
Original file line number Diff line number Diff line change 1+ import { Pipe , PipeTransform } from '@angular/core' ;
2+ import * as moment from 'moment-timezone' ;
3+
4+ @Pipe ( {
5+ name : 'timezoneOffset'
6+ } )
7+ export class TimezoneOffsetPipe implements PipeTransform {
8+
9+ transform ( timezone : string ) : string {
10+ console . log ( timezone ) ;
11+ const offset = moment . tz ( timezone ) . format ( 'Z' ) ; // Obtener offset como +02:00
12+ return `GMT${ offset } ` ; // Concatenar con 'GMT'
13+ }
14+
15+ }
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ import {SafePipe} from './pipes/safe.pipe';
217217import { HighlightPipe } from './pipes/text/highlight.pipe' ;
218218import { UtmNotifier } from './websocket/utm-notifier' ;
219219import { UtmCollectorDetailComponent } from './components/utm/util/utm-collector-detail/utm-collector-detail.component' ;
220+ import { TimezoneOffsetPipe } from './pipes/timezone-offset.pipe' ;
220221
221222
222223@NgModule ( {
@@ -356,7 +357,8 @@ import {UtmCollectorDetailComponent} from './components/utm/util/utm-collector-d
356357 ZoomDirective ,
357358 IrVariableCreateComponent ,
358359 IncidentVariableSelectComponent ,
359- EmailSettingNotificactionComponent
360+ EmailSettingNotificactionComponent ,
361+ TimezoneOffsetPipe
360362 ] ,
361363 exports : [
362364 IndexPatternCreateComponent ,
@@ -449,7 +451,8 @@ import {UtmCollectorDetailComponent} from './components/utm/util/utm-collector-d
449451 UtmVersionInfoComponent ,
450452 IrVariableCreateComponent ,
451453 IncidentVariableSelectComponent ,
452- EmailSettingNotificactionComponent
454+ EmailSettingNotificactionComponent ,
455+ TimezoneOffsetPipe
453456 ] ,
454457 entryComponents : [
455458 LoginComponent ,
Original file line number Diff line number Diff line change 1- version : 10.5.8
1+ version : 10.5.9
You can’t perform that action at this time.
0 commit comments