我正在尝试使用角度管道将timestamp转换为日期格式。我在HTML模板中写道:
timestamp
{{myTimestamp | date}}
其中myTimestamp的类型为number。
myTimestamp
我得到了意想不到的结果,例如,时间戳1468251287 (与2016年11月7日匹配)显示为Jan 18, 1970。
1468251287
Jan 18, 1970
我想知道如何解决这个问题。
https://stackoverflow.com/questions/38569832
相似问题