NativeScript / NativeScript/android
Local timezone not taken into account in API Level 24
未关闭
还没有人认领这个 Issue。
bug
severity: high
- 主要语言
- C++
- 星标
- 563
- 派生
- 144
- 平均合并
- 10 小时 46 分钟
- 30 天内合并 PR
- 14
描述
Environment
- CLI: 5.1.0
- Cross-platform modules: 5.1.0
- Android Runtime: 4.2.0 (and higher)
Describe the bug
The local timezone is not properly taken into account when creating dates (GMT is always assumed).
To Reproduce
- Create a x86 Android emulator using API Level 24
- Set to some custom timezone in the device Settings.
Expected behavior
The timezone is properly taken into account when using console.log(new Date());:
Thu Jan 24 2019 09:40:47 GMT+0200 (EET)
Actual Behavior
The date is assumed in GMT:
Thu Jan 24 2019 07:40:47 GMT+0000 (GMT)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 API Level 24 上的 x86 Android 模拟器重现该问题,设置自定义时区,然后运行 console.log(new Date())。将结果与预期的本地偏移量以及此处描述的 GMT 输出进行比较。完成的标准是,在 API Level 24 及更高版本上创建日期时遵循设备时区。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, cpp
- 领域
- mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100