javascript - 不考虑用户时区
问题描述
我在约会方面遇到了麻烦。
注意:我进入欧洲/罗马时区。
我有以下日期
....
new Date("2019-04-03T00:00:00+02:00")
it returns: Wed Apr 03 2019 00:00:00 GMT+0200 (Ora legale dell’Europa centrale)
....
如果我在我的 PC 上更改时区 (GMT -4),它会返回,例如,
....
new Date("2019-04-03T00:00:00+02:00")
it returns: Tue Apr 02 2019 18:00:00 GMT-0400 (GMT-04:00)
....
我想要做的是在不考虑用户时区的情况下将日期(2019-04-03T00:00:00+02:00)到用户日历(即使它在加拿大我想在用户日历欧洲/罗马上显示时区。
你有什么建议吗?
谢谢
解决方案
推荐阅读
- laravel - 使用 constrained() 方法时在 Laravel 迁移中为外键指定名称
- reactjs - 如何使用 React-Bootstrap 和 Redux 显示/隐藏 Modal?
- angular - 在生产中的科尔多瓦插件中使用带有离子的 FileReader 时出错
- python - 引用大型 JSON 文件的部分内容
- c# - FirebaseMessaging.TokenReceived 永远不会被触发
- radio-button - 聚合物键盘快捷键干扰单选按钮上现有的输入功能
- flutter - Flutter 自定义表情符号选择器
- linux - 从虚拟机(docker容器)发送通知到主机
- python - Conda 包未将环境放置在正确的路径中
- javascript - Firebase Cloud Firestore 规则允许获取但不允许列出