incorrect result of javascript function getTimezoneOffset in Turkey
Categories
(Core :: JavaScript: Internationalization API, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | wontfix |
firefox67 | --- | fix-optional |
firefox68 | --- | affected |
People
(Reporter: megamonstrik, Unassigned, NeedInfo)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Set timezone on the phone to Istanbul. Timezone offset is GMT+3 during the whole year, no DST. Go to the test page https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_gettimezoneoffset and press button
If change timezone to Moscow (it is GMT+3 without DST too) bug is not appears.
Actual results:
-120
Expected results:
-180
Reporter | ||
Comment 1•6 years ago
|
||
Result of getTimeZoneOffset function is 180 today. But last Sunday of month was day of transition to summer time earlier. Transition to DST in Turkey was cancelled in 2016. Firefox has outdated internal timezone database.
Comment 2•6 years ago
|
||
Hi, thanks for your report.
I tested your issue using OnePlus 5T (Android 9) and Google Pixel (Android 9) on the latest version of Nightly (2019-04-01) and Release 66.0.2 but I wasn't able to reproduce it.
Can you provide us more details regarding your problem? (phone/android, specific settings from FF, Firefox version).
Also, if you can make a video with the accurately flow, it will be very helpful.
I'll wait for your updates, thanks.
Comment 3•6 years ago
|
||
Couldn't reproduce either using my ancient Android 5.1 NVIDIA Shield on the latest Nightly.
This reminded me of bug 1334798 though.
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Makoto, do you think this is the same root cause as bug 1334798?
Comment 5•6 years ago
|
||
(In reply to Liz Henry (:lizzard) (use needinfo) from comment #4)
Makoto, do you think this is the same root cause as bug 1334798?
Hmm, bug 1334798 is related to old code (we had removed!) that depends on OS's data. But SpiderMonkey may still use time() and localtime() by UTCToLocalStandardOffsetSeconds?. If using time and localtime, it depends on OS's impl.
Moving to correct component.
Comment 6•6 years ago
|
||
I'll just assume 68 is affected for now. megamonstrik, can you confirm?
Reporter | ||
Comment 7•6 years ago
|
||
I have tested on two my phones. First is LeEco Le Pro 3. Firmware is LineageOS 15.1, built on 05-September-2018, based on Android Oreo 8.1. Internal android tzdata updated to 2018f. Tested firefox versions - firefox mobile 66.0.2, firefox beta 67b11. Bug exist. Chrome v73.0.3683.90 works correct. Firefox nightly 68.0a1 from 2019-04-17 - bug exists too. Interesting moment - when I change time to the past (for example to 25-March-2019) firefox shows SEC_ERROR_OCSP_FUTURE_RESPONSE_ERROR. I can open test page with current date and then change date to the past.
My second phone is old Jiayu S3. Firmware 5.1 from China company Jiayu built on September 2015. Internal android tzdatabase 2016h, then I updated it to 2018f. Bug is not exists. It is strange. And firefox does not show SEC_ERROR_OCSP_FUTURE_RESPONSE_ERROR for dates in the past.
Reporter | ||
Comment 8•6 years ago
|
||
I have tested old firefox versions - 62.0 does not have this bug, 63.0 have this bug.
Comment 9•6 years ago
|
||
(In reply to megamonstrik from comment #8)
I have tested old firefox versions - 62.0 does not have this bug, 63.0 have this bug.
Thanks for tracking it down to 63, that means this issue is caused by bug 1346211.
I assume evaluating Intl.DateTimeFormat().resolvedOptions().timeZone
doesn't show "Europe/Istanbul"
, but instead "EET"
?
In that case, this bug should get fixed by bug 1487594, which will fix ICU (the library used to detect the time zone) to properly detect the current time zone on Android.
Reporter | ||
Comment 10•6 years ago
|
||
Firefox 66.0.2 shows "Europe/Athens" on LeEco Phone
Comment 11•6 years ago
|
||
Ah, yes. "EET" is mapped to "Europe/Athens" in [1] by ICU. Thanks for confirming!
Comment 12•6 years ago
|
||
The priority flag is not set for this bug.
:Waldo, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 13•5 years ago
|
||
Incorrect system time zone computed by ICU on Android is also tracked in bug 1534160 (and bug 1487594), so let's dup this over to the other bug.
Description
•