为什么日期管道在chrome,chromium和Opera中显示错误的格式?

问题描述 投票:0回答:1

i have given date format as date:'dd-MM-yyyy HH:mm:ss' but it is showing 02-03-2020 24:45:00嗨,大家好,我们使用的是角度4。我们使用的是角度日期管道将日期格式设置为dd-MM-yyyy HH:mm:ss。从上周开始,该格式无法正常运行,而不是在清晨显示02-03-2020 00:45:00,它显示的是02-03-2020 24:45:00这是错误的。谁能告诉我们为什么它会有这种行为。

注:在Firefox中,它正确显示,但在铬,铬,歌剧院中显示不正确

angular datetime-format date-pipe
1个回答
0
投票

您应将应用程序升级到较新版本的Angular。日期管道问题已在版本5中得到纠正:

使用Stackblitz在Angular 4中重现您的错误:https://stackblitz.com/edit/angular-scxsq6

相同的代码,但升级到Angular 5的作品:https://stackblitz.com/edit/angular-cf3ajh

以及有关该问题的更多信息:https://github.com/angular/angular/issues/8319#issuecomment-318576526

© www.soinside.com 2019 - 2024. All rights reserved.