[Webkit-unassigned] [Bug 240047] New: Date times do not respect the system's 12/24-hour time format override
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 3 17:02:20 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=240047
Bug ID: 240047
Summary: Date times do not respect the system's 12/24-hour time
format override
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: reingator at gmail.com
Created attachment 458766
--> https://bugs.webkit.org/attachment.cgi?id=458766&action=review
Screenshot showing the system's Language & Region setting and bug in STP
With a 12-Hour time region like United States, when formatting a date with .toLocaleTimeString(), the result is a 12-Hour time even if the system is set to 24-Hour. Conversely, if your region does normally use 24-Hour time, like Germany, having the 24-Hour time format disabled is not reflected in the date time.
The same follows for the "time" input type, but only on macOS. iOS and iPadOS both render this correctly with the overriding setting.
To test on macOS, go to System Preferences > Language & Region and check the 24-hour time format if in a 12-hour time region or uncheck it if in a 24-hour region. On iOS/iPadOS go to Settings > General > Date & Time and enable or disable 24-Hour time.
Run `(new Date()).toLocaleDateTimeString()` in the console and render `<input type="time" />` in HTML.
Both should reflect the system's 24-hour time override setting, but do not.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220504/9a0c2eeb/attachment.htm>
More information about the webkit-unassigned
mailing list