Angular 4 date pipe, no timezone

北慕城南 提交于 2019-12-05 20:18:58

Try this:-

<!--output '2015-06-15 09:03 AM GMT+9'-->
<p>The custom date with fixed timezone is {{myDate  | date:'yyyy-MM-dd HH:mm a z':'+0900'}}</p>

Refer:- https://angular.io/api/common/DatePipe

I just saw that my question missed a solution. So there it is :

The date was fine when I was running app on my workstation, but magic happened when it was running on our company's server. Solution : the server had wrong timezone selected.

Thank's!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!