【问题标题】:Convert timestamp to america/newyork timezone in angular 2以角度 2 将时间戳转换为美国/纽约时区
【发布时间】:2017-07-14 19:24:51
【问题描述】:

如何将“startTime”:1498861504 转换为角度 2 中的特定美国/纽约时区

如果可以提供 sn-p 代码,我是否需要为 i 创建管道会有所帮助

【问题讨论】:

    标签: angular


    【解决方案1】:

    如果您只想在视图中显示结果,您可以这样做

    {{ date_expression | date : format : timezone}}
    

    更多详情https://docs.angularjs.org/api/ng/filter/date

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-22
      • 1970-01-01
      • 2011-05-10
      • 1970-01-01
      • 2013-05-20
      • 2013-06-30
      相关资源
      最近更新 更多