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:
1 parent
0da16e9548
commit
97579ea9d3
13 files changed
+104
-78
No files matched your search
@@ -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