Date & Time settings does not show correct timezone when NITZ is used

VERIFIED FIXED in 2.2 S12 (15may)

Status

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: pgravel, Assigned: arthurcc)

Tracking

unspecified
2.2 S12 (15may)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.2+, b2g-v2.2 verified, b2g-master verified)

Details

(Whiteboard: [caf priority: p2][CR 833429])

Attachments

(5 attachments)

Reporter

Description

4 years ago
The region and city settings always show the user selection even when automatic time is enabled and NITZ has been successfully applied.

Please note that the timezone changes are still applied properly and the time is updated as expected. This bug is specifically about a problem with the Region/City fields not showing the correct timezone when using NITZ in the settings Date & Time UI.

Steps to reproduce:
1) Disable automatic time update
2) Set timezone to America/New York
3) Re-enable automatic time update
4) NITZ re-applies and sets tz to UTC-07:00 (pacific daylight time, America/Los Angeles)
5) UI still shows America/New York

Closing & reopening settings still shows America/New_York. Rebooting doesn't help either, displayed region/city remains America/New York. Overwriting "UTC-07:00" with "America/Los_Angeles" in time.timezone doesn't help either.

UI seems to have a hard preference to always show "time.timezone.user-selected" instead of "time.timezone". If that is the expected behavior, UI shouldn't even show Region/City when automatic time is enable because it is showing non-current information.
There is an issue where the settings resets to America/New York when going into the settings; bug 975815 ( might be related?  Not sure )
Whiteboard: [CR 833429] → [caf priority: p2][CR 833429]

Comment 2

4 years ago
Arthur has checked this is an UI issue and will help with this.
Assignee: nobody → arthur.chen
blocking-b2g: 2.2? → 2.2+
This is an UI issue introduced by this spec[1] in v2.0. Currently we disable the selectors for choosing cities when automatic time is enabled but we are unable to update the selectors to reflect the current time zone. I would suggest simply hide the selectors and display the GMT string just like we did in the releases before v2.0.

[1]: https://bugzilla.mozilla.org/attachment.cgi?id=8390922
Status: NEW → ASSIGNED
Comment on attachment 8602580 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

EJ, in this patch I did the following things, would you mind review it? Thanks.
- Add a new span for displaying the current timezone in a string when auto time is enabled
- Trigger a change event so that tz_select can write the previous uesr-selected time zone back to time.timezone.
- HTML cleanup

Jenny, please help check the UI part, thanks.
Attachment #8602580 - Flags: ui-review?(jelee)
Attachment #8602580 - Flags: review?(ejchen)

Comment 6

4 years ago
Comment on attachment 8602580 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

Looks great =)!!
Attachment #8602580 - Flags: ui-review?(jelee) → ui-review+
Comment on attachment 8602580 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

Thanks Arthur, only few nits left on the patch, please check it when you have time. r++
Attachment #8602580 - Flags: review?(ejchen) → review+
Thanks, EJ!
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Sorry, reverted for causing Gij failures. Autolander is supposed to be preventing this, but somehow it got coalesed into a success run of a later job. Could this possibly be intermittent?

Revert: https://github.com/mozilla-b2g/gaia/commit/0046a7f923c50278b5778f1927f86a72f0b83439

Errors: https://treeherder.mozilla.org/logviewer.html#?job_id=221618&repo=gaia-master

I suppose you could reland this, carrying the review assuming the tests pass next time.
Status: RESOLVED → REOPENED
Flags: needinfo?(arthur.chen)
Resolution: FIXED → ---
Comment on attachment 8603965 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

EJ, I'm requesting a review on the part of updating the marionette test. The original test was made on the basis of the existence of the time zone selector but now it has been replaced with a string. Please help review it when you get a chance, thanks!
Flags: needinfo?(arthur.chen)
Attachment #8603965 - Flags: review?(ejchen)
Comment on attachment 8603965 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

r+, thanks Arthur !!
Attachment #8603965 - Flags: review?(ejchen) → review+
All tests were passed: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=2df74d9916da23706994c46c640dc0b029715a15
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Comment on attachment 8603965 [details] [review]
[gaia] crh0716:1162276 > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): N/A
[User impact] if declined: Users can be mislead.
[Testing completed]: Testing on the device. Unit tests and marionette tests were updated.
[Risk to taking this patch] (and alternatives if risky): Low. Only minor UI changes.
[String changes made]: None
Attachment #8603965 - Flags: approval-gaia-v2.2?
master: ad61a0e4db38fdb42feca054725fc1f4f33e743a
Hi Norry,
Please verify the fix on master. Thanks!
Flags: needinfo?(fan.luo)
Keywords: verifyme
This bug has been verified as pass on latest Nightly build of Flame v3.0 and Nexus 5 v3.0 by the STR in Comment 0.

Actual results: It shows correct timezone and date&time when NITZ is used.
See attachment: verified_v3.0.mp4
Reproduce rate: 0/5.

Device: Flame v3.0 build(Pass)
Build ID               20150513160203
Gaia Revision          338f66e6a96491d2f5854b188c6b141ceb690d97
Gaia Date              2015-05-13 14:08:45
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/1fab94ad196c
Gecko Version          41.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150513.193307
Firmware Date          Wed May 13 19:33:19 EDT 2015
Bootloader             L1TC000118D0

Device: Nexus 5 v3.0 build (Pass)
Build ID               20150513010202
Gaia Revision          0d6c04f13fd385bda045f4e539b2a67cb5d84b1d
Gaia Date              2015-05-12 17:07:06
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/62d9b117c688
Gecko Version          41.0a1
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150513.044441
Firmware Date          Wed May 13 04:44:56 EDT 2015
Bootloader             HHZ12f

Note:
When changing the timezone and then enabling "Set Automatically" ,sometimes it does not shows the words "Region/City" (ex:"America/Los_Angeles") under "Time Zone" but shows blank area. I will submit a new bug about this later.

-----------------------------------------------------------------------
Leaving "verifyme" for v2.2 uplift & verification.
Flags: needinfo?(fan.luo)

Updated

4 years ago
Attachment #8603965 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
See Also: → 1164797
QA Whiteboard: [MGSEI-Triage+]
Comment on attachment 8607903 [details] [review]
[gaia] crh0716:1162276_v2.2 > mozilla-b2g:v2.2

EJ, could you help review the patch?

Although I couldn't see any error here[1] and I was not able to run the marionette tests on v2.2. However, I think the current test trying to manipulate a selector that depends on some platform settings (the availability of auto timezone) and which may not be robust, so I turn to manipulate the time format selector that is fixed under all conditions.

The other part of this patch would be exactly the same as one in bug 1164797. I included that patch here because the bug was regressed by this one and we can fix it here.

Thanks!

[1]: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=e74cb55ae6e40161d8a740f531e7d928c22dac41
Flags: needinfo?(arthur.chen)
Attachment #8607903 - Flags: review?(ejchen)
Comment on attachment 8607903 [details] [review]
[gaia] crh0716:1162276_v2.2 > mozilla-b2g:v2.2

Thanks Arthur, please remember to update the patch based on the change you made in bug 1164797, by doing so, we can make these scripts not so diverse. Thanks  !!
Attachment #8607903 - Flags: review?(ejchen) → review+
This bug has been verified as "pass" on latest Nightly build of Flame v2.2 and Nexus 5 v2.2 by the STR in Comment 0.

Actual results: It shows correct timezone (UTC+8:00) when NITZ is used.
See attachment: verified_Flame_v2.2.3gp
Reproduce rate: 0/10


Device: Flame v2.2 (Verified) 
Build ID               20150706002507
Gaia Revision          ea11f422b687a982f0a961c9aea7858066561707
Gaia Date              2015-07-02 23:37:50
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c0214b4c1ea0
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150706.035706
Firmware Date          Mon Jul  6 03:57:18 EDT 2015
Bootloader             L1TC000118D0

Device: Nexus5 v2.2 (Verified) 
Build ID               20150706002507
Gaia Revision          ea11f422b687a982f0a961c9aea7858066561707
Gaia Date              2015-07-02 23:37:50
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c0214b4c1ea0
Gecko Version          37.0
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150706.041056
Firmware Date          Mon Jul  6 04:11:15 EDT 2015
Bootloader             HHZ12f


-------------------------------------------------------------
Note:
1. It shows a blank area instead of "region/city" under "City", please see Bug 1164797, Bug 1169154.
2. Changing the time zone then enabling "set time automatically" modifies the time to an incorrect value, please see Bug 1178259.
Status: RESOLVED → VERIFIED
Keywords: verifyme

Updated

4 years ago
See Also: → 1169154
You need to log in before you can comment on or make changes to this bug.