Commit 1ecfcada authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS Settings] Fix time displayed format for night slider settings.

The navigator.language must be explicitly passed into the time
formatter for ES-419 formatted time to be displayed. This also
corrects the additional zero shown in single digit hours.

Bug: 1076309
Change-Id: Idd09e744e72a5d0cbaaa1ec92e4d1b88a8683105
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250473Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779691}
parent 97ae4974
...@@ -320,7 +320,8 @@ Polymer({ ...@@ -320,7 +320,8 @@ Polymer({
d.setMilliseconds(0); d.setMilliseconds(0);
return d.toLocaleTimeString( return d.toLocaleTimeString(
[], {hour: '2-digit', minute: '2-digit', hour12: !shouldUse24Hours}); navigator.language,
{hour: 'numeric', minute: 'numeric', hour12: !shouldUse24Hours});
}, },
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment