【问题标题】:Display Date with Current Timezone in angularjs在angularjs中显示当前时区的日期
【发布时间】:2015-01-15 18:30:04
【问题描述】:

如何在 Angular js 中使用当前 UTC 时区缩写显示日期。 例如,我想将日期显示为 2014 年 9 月 2 日下午 3:15 PST 或 2014 年 9 月 2 日下午 3:15 IST 等

【问题讨论】:

    标签: angularjs date angularjs-filter


    【解决方案1】:

    AngularJS 仅支持 'UTC' 时区。详情可以参考API Reference。 相反,您可以使用其他 JS 库来执行此操作。建议使用moment-timezone.js

    【讨论】:

    • 从 1.4.0-rc.0 版本开始,AngularJS 也支持其他时区。
    猜你喜欢
    • 2014-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多