Angular 日期管道在提供时区时跳过可选参数格式

Angular Date Pipe skip optional parameter format while providing timezone

我需要向日期管道提供时区 (+0000),因为我使用的是 UTC 时间戳,如下所示:

 | date:'dd.MM.yyyy':'+0000'

由于美国正在使用“MM.dd.yyyy”,因此我不想指定 format 管道参数。

我试过提供 false、null 和 0,但它们破坏了管道。

如何跳过 angular 管道或特别是日期管道中的可选参数?

只需提供未定义的参数:

(dateVariable  | date:undefined:'+0000'