Closed Bug 1054135 Opened 10 years ago Closed 10 years ago

[B2G][System] support 24 hour time format for Time picker

Categories

(Firefox OS Graveyard :: Gaia::System::Input Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.1, b2g-v2.1 affected)

VERIFIED FIXED
2.1 S3 (29aug)
feature-b2g 2.1
Tracking Status
b2g-v2.1 --- affected

People

(Reporter: gasolin, Assigned: gasolin)

References

Details

(Whiteboard: [p=2])

Attachments

(2 files)

Test steps:

1. Open settings app
2. change the Time format settings in Settings > Date & Time > Time Format panel

Expect:

The time format in Time picker will be changed.


here's the patch steps to apply correct time format:

2. detect proper time format via mozHour12 API, and get correct time format string from new 'shortTimeFormat12'/'shortTimeFormat24'.

```
var timeFormat = window.navigator.mozHour12 ? _('shortTimeFormat12') : _('shortTimeFormat24');
```


The full usage is at [3](WIP) for reference.


[3] https://github.com/mozilla-b2g/gaia/pull/22757/files
Fred will help on this, thanks!
Assignee: nobody → gasolin
Blocks: 903683
feature-b2g: --- → 2.1
Whiteboard: [systemsfe]
Component: Gaia::System → Gaia::System::Input Mgmt
Whiteboard: [systemsfe]
Target Milestone: --- → 2.1 S3 (29aug)
QA Whiteboard: [COM=SystemPlatform]
* use mozHour12 to detect 12/24 hour
* add listener to redraw timepicker
* remove date_picker since its not used
* add test case
Attachment #8474352 - Flags: review?(alive)
Attachment #8474352 - Flags: review?(alive) → review+
merged https://github.com/mozilla-b2g/gaia/commit/b3982ed710e2accf398a873494e143a9fe372e07

thanks!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [p=2]
I believe the root cause is we got timeformatchange event when language changed, but there's no existing timepicker.

additional commit is here
https://github.com/gasolin/gaia/commit/c863476afbc8f36e14d96176a680f01eec38032a

I'd squash them after review granted. Please kindly review it again.
Attachment #8475716 - Flags: review?(alive)
Comment on attachment 8475716 [details] [review]
pull request redirect to github

Something was broken so deserve a test, but up to you.
Attachment #8475716 - Flags: review?(alive) → review+
merged https://github.com/mozilla-b2g/gaia/commit/579a8714d1c5b382bdd10383477d1221c04dc288

thanks!
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
The user is able to choose from 1-23 hours in the timer picker when using 24hr Time Format in the settings app as expected. Unable to verify this bug until the depends on are verified
QA Whiteboard: [COM=SystemPlatform] → [COM=SystemPlatform][QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [COM=SystemPlatform][QAnalyst-Triage?] → [COM=SystemPlatform][QAnalyst-Triage-]
Flags: needinfo?(ktucker) → needinfo?(dharris)
Since the Time picker is implemented and working correctly, as stated in comment 8, closing this bug as verified fixed
Status: RESOLVED → VERIFIED
QA Whiteboard: [COM=SystemPlatform][QAnalyst-Triage-] → [COM=SystemPlatform][QAnalyst-Triage?]
Flags: needinfo?(dharris) → needinfo?(ktucker)
Blocks: 1064898
QA Whiteboard: [COM=SystemPlatform][QAnalyst-Triage?] → [COM=SystemPlatform][QAnalyst-Triag+]
Flags: needinfo?(ktucker)
QA Whiteboard: [COM=SystemPlatform][QAnalyst-Triag+] → [COM=SystemPlatform][QAnalyst-Triage+]
Depends on: 1068030
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: