Closed Bug 1540304 Opened 6 years ago Closed 5 years ago

incorrect result of javascript function getTimezoneOffset in Turkey

Categories

(Core :: JavaScript: Internationalization API, defect)

66 Branch
ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1534160
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

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.

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.

Flags: needinfo?(megamonstrik)
OS: Unspecified → Android
Hardware: Unspecified → ARM

Couldn't reproduce either using my ancient Android 5.1 NVIDIA Shield on the latest Nightly.

This reminded me of bug 1334798 though.

Makoto, do you think this is the same root cause as bug 1334798?

Flags: needinfo?(m_kato)

(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.

Component: General → JavaScript: Internationalization API
Flags: needinfo?(m_kato)
Product: Firefox for Android → Core
Version: Firefox 66 → 66 Branch

I'll just assume 68 is affected for now. megamonstrik, can you confirm?

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.

Flags: needinfo?(megamonstrik)

I have tested old firefox versions - 62.0 does not have this bug, 63.0 have this bug.

(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.

Firefox 66.0.2 shows "Europe/Athens" on LeEco Phone

Ah, yes. "EET" is mapped to "Europe/Athens" in [1] by ICU. Thanks for confirming!

[1] https://searchfox.org/mozilla-central/rev/b4e790d05f5a146d186c238bac5601a553581d23/intl/icu/source/common/putil.cpp#818

The priority flag is not set for this bug.
:Waldo, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwalden)

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.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.