Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Local timezone not taken into account in API Level 24

未關閉
#1,255 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
android, cpp
領域
mobile-dev

研究方向

使用 API Level 24 上的 x86 Android 模擬器重現此問題,設定自訂時區,然後執行 console.log(new Date())。將結果與預期的本地偏移量以及此處描述的 GMT 輸出進行比較。完成的標準是,在 API Level 24 及更高版本上建立日期時遵循裝置時區。

由索引模型根據 Issue 內容生成。

描述

bug severity: high

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

  1. Create a x86 Android emulator using API Level 24
  2. 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)

主要語言
C++
星號
563
分支
144
平均合併
10 小時 46 分鐘
30 天內合併 PR
14

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NativeScript/android 的其他 Issue

查看 NativeScript/android 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。