import { Pipe , PipeTransform } from '@angular/core' ; import * as moment from 'moment' ; import { toLocal } from '@gauzy/common-angular' ; @ Pipe ( { name : 'utcToLocal' } ) export class UtcToLocalPipe implements PipeTransform { transform ( value , format = 'HH:mm' ) { let date = moment ( value ) ; if ( ! date . isValid ( ) ) { date = moment . utc ( value , format ) ; } return toLocal ( date ) . toDate ( ) ; } }