Closed
Bug 1035761
Opened 10 years ago
Closed 10 years ago
[B2G][Cost Control] support 24 hour time format
Categories
(Firefox OS Graveyard :: Gaia::Cost Control, defect)
Tracking
(feature-b2g:2.1, b2g-v2.1 verified)
Tracking | Status | |
---|---|---|
b2g-v2.1 | --- | verified |
People
(Reporter: howie, Assigned: salva)
References
Details
Attachments
(2 files)
There will be a setting toggle to let user choose between 12/24 hour time format in v2.1. User story and settings spec: Bug 903683
For each app, the tasks to do after toggle is added would be:
1.Read/listen to the time format toggle value/change event.
2.Input the corresponding time format to existing mozL10n.DateTimeFormat() function. Currently the input time format should be a fixed 12 hour
shortTimeFormat = %I:%M %p , line 201 of http://goo.gl/DR4CNe. There will be a 24 hour time format added.
3.Show the return of the function as it's doing now.
Reporter | ||
Comment 1•10 years ago
|
||
Hi Daniel, there is 12/24 hour time format work for cost control in FX OS 2.1. Will you be able to take this? Thank you!
Flags: needinfo?(dcoloma)
Updated•10 years ago
|
Flags: needinfo?(dcoloma)
Reporter | ||
Comment 2•10 years ago
|
||
Hi Maria, have you found developer for this? The work may start after dependent bug 1023735 is fixed, around Aug 18th. Thank you!
Flags: needinfo?(oteo)
Comment 3•10 years ago
|
||
Sure, Salva can work in it as Marina in in PTO until end of August.
Salva, can you assign the bug to yourself? thanks a lot!
Flags: needinfo?(oteo) → needinfo?(salva)
Assignee | ||
Comment 4•10 years ago
|
||
Sure! Assigning to me!
Assignee: nobody → salva
Flags: needinfo?(salva)
Comment 5•10 years ago
|
||
Test steps:
1. Open settings app
2. change the Time format settings in Settings > Date & Time > Time Format panel
Expect:
The time format in cost control app will be changed.
here's the patch steps to apply correct time format:
1. include navigator.mozHour12 API shim in gaia app's html
```
<script defer src="shared/js/date_time_helper.js"></script>
```
(currently we still need at least `settings: readonly` permission in manifest, which might changed in next release)
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');
```
3. call mozL10n DateTimeFormat to localize it
4. listen to 'timeformatchange' event and localize time strings when its triggered
The full usage is at [3](WIP) for reference.
[3] https://github.com/mozilla-b2g/gaia/pull/22757/files
Reporter | ||
Comment 6•10 years ago
|
||
Hi Salva, the Settings app work is done and you may start the bug now :)
The detail is in Comment 5, feel free to let us know if there's any question, thank you!
Flags: needinfo?(salva)
Target Milestone: --- → 2.1 S3 (29aug)
Assignee | ||
Comment 7•10 years ago
|
||
Sorry for the delay :howie but I was attending bug 1043662 which is 2.0+
I'm working on this one right now.
Flags: needinfo?(salva)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8475816 -
Flags: review?(jmcf)
Assignee | ||
Updated•10 years ago
|
Attachment #8475816 -
Flags: review?(jmcf) → review?(francisco)
Comment 9•10 years ago
|
||
Comment on attachment 8475816 [details] [review]
Add support for 24h / 12h time format changes.
Excellent job here.
Just left a super tiny comment, but apart from that r+
Attachment #8475816 -
Flags: review?(francisco) → review+
Assignee | ||
Comment 10•10 years ago
|
||
master: e410e931c53bf4d67b09e90bc4e57baadc580a8e
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
status-b2g-v2.1:
--- → fixed
Reporter | ||
Comment 11•10 years ago
|
||
Thanks everyone!
Updated•10 years ago
|
QA Contact: lolimartinezcr
Comment 12•10 years ago
|
||
Tested and working but it * isn't verified * because we need to test hour time format in balance with a prepaid SIM card with coverage.
Flame
2.1
Gecko-2fbbb04
Gaia-59bd661
Cost control properly updates its time based on the format specified in settings with both Postpaid, and Prepaid SIM cards. However, I am unable to verify this bug until the depends on bug is verified first (bug 1023735)
QA Whiteboard: [QAnalyst-Triage?][QAnalyst-verify-]
Flags: needinfo?(ktucker)
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage?][QAnalyst-verify-] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Comment 14•10 years ago
|
||
This issue has been verified successfully on Flame 2.1
See attachment: Flame2.1_screenshot.png
Reproducing rate: 0/3
Reproducing steps:
1. Open settings app
2. Date & Time > Time Format
** The 24-hour time format has been added.
Flame 2.1 build:
Gaia-Rev dbaf3e31c9ba9c3436e074381744f2971e15c7bf
Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/ebce587d2194
Build-ID 20141203001205
Version 34.0
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•