Dates and times should now be handled properly once the server is set on UTC time and the proper timezone offset environment variable is set.
This commit is contained in:
@ -9,6 +9,11 @@ export class LocalTimePipe implements PipeTransform {
|
||||
if (value === undefined) {
|
||||
return '';
|
||||
}
|
||||
if (value.length === 5) {
|
||||
return moment(value, 'HH:mm')
|
||||
.subtract(new Date().getTimezoneOffset(), 'minutes')
|
||||
.format('HH:mm');
|
||||
}
|
||||
return moment(value, 'DD-MMM-YYYY HH:mm')
|
||||
.subtract(new Date().getTimezoneOffset(), 'minutes')
|
||||
.format('DD-MMM-YYYY HH:mm');
|
||||
|
||||
Reference in New Issue
Block a user