0

i have given date format as date:'dd-MM-yyyy HH:mm:ss' but it is showing 02-03-2020 24:45:00 Hi guys, we are using angular 4. we are using angular date pipe to format date as dd-MM-yyyy HH:mm:ss. from last one week the format is not working properly instead of showing 02-03-2020 00:45:00 for early morning ,it is showing 02-03-2020 24:45:00 which is wrong. Can anyone tell us why it is behaving like this .

Note : in firefox it is showing correctly but showing wrongly in chrome,chromium,opera

1 Answers1

0

You should upgrade you application to a newer version of Angular. The Date Pipe problem was corrected in version 5:

Stackblitz to reproduce your error in Angular 4: https://stackblitz.com/edit/angular-scxsq6

Same code but upgraded to Angular 5 works: https://stackblitz.com/edit/angular-cf3ajh

And more information about the problem: https://github.com/angular/angular/issues/8319#issuecomment-318576526

Kari F.
  • 1,214
  • 10
  • 16