momentjs - moment.tz 使用 UTC
问题描述
我很难理解moment.tz,基本上我正在将时间转移到欧洲/苏黎世时间
moment
.tz(moment(time), 'Europe/Zurich')
.format()
而不是这个我想在UTC时间而不是欧洲/苏黎世转换它,我尝试使用
moment
.utc(time)
.format()
没有成功,有没有办法像我在第一个考试中那样做?,即:
moment
.tz(moment(time), 'UTC')
.format()
还是会飞得很高?
谢谢你的时间
解决方案
推荐阅读
- azure - 在 Azure 上的免费层上部署 Java 应用程序时出错
- swift - 枚举具有关联值的枚举 - Swift
- gradle - 什么是 Gradle 依赖配置?
- ios - 谷歌地图正在快速显示带有标记的普通页面
- android - 无法取消在 kotlin 中定义的警报
- javascript - 使用 js 或 jquery 更改 inputfile 的图像值
- javascript - 引导箱中的 Href 按钮
- laravel - 如何在 laravel 中获取 hasMany 关系?
- javascript - Vue FullCalendar,设置点击事件
- javascript - 大尺寸视频在 ipad 中不自动播放