<input type="time"> is 12 hours off when system 24-hour format is used

RESOLVED FIXED in Firefox 21

Status

()

Firefox for Android
Keyboards and IME
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: Markus Popp, Assigned: wesj)

Tracking

21 Branch
Firefox 21
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20130109 Firefox/21.0
Build ID: 20130109030942

Steps to reproduce:

On Firefox 21.0a1 using Samsung Galaxy S2, Android 4.0.4:

Accessing an <input type="time"> field, the default time is 12 hours off actual time.


Actual results:

See https://twitter.com/mpopp75/status/289100648178388992/photo/1

Time is 21:02 (see upper top corner), time field shows 09:02, despite being a 24 hour clock.


Expected results:

Default time should have been 21:02.
(Reporter)

Updated

6 years ago
OS: Linux → Android
Hardware: x86_64 → ARM

Updated

6 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → Keyboards and IME
Reproduced.
Component: Keyboards and IME → General

Updated

6 years ago
Summary: <input type="time"> is 12 hours off → <input type="time"> is 12 hours off when system 24-hour format is used

Updated

6 years ago
Component: General → Keyboards and IME
(Assignee)

Comment 2

6 years ago
Created attachment 700067 [details] [diff] [review]
Patch v1

Interesting. We're passing in value="" from the empty input here, so we don't update the default time at all.

Android (I guess) initializes the input before call input.setIs24HourFormat() and doesn't update it after we do. This forces it to update.
Attachment #700067 - Flags: review?(nchen)
Comment on attachment 700067 [details] [diff] [review]
Patch v1

Thanks!
Attachment #700067 - Flags: review?(nchen) → review+

Updated

6 years ago
Assignee: nobody → wjohnston

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/1161ba1f3d6f
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
(Reporter)

Comment 6

6 years ago
Thanks for the quick fix.

Previous versions (Aurora, Beta & Release) are also affected, so you may want to consider uplifting the fix.
You need to log in before you can comment on or make changes to this bug.