Description of problem: When hovering over the time-series graph shown below the pie charts, a tooltip showing a data, a time and a value is shown. The date and time values shown are currently US-only [1] and do not seem to be affected by either the browser or the engine host locale settings. [1]: https://en.wikipedia.org/wiki/Date_format_by_country Version-Release number of selected component (if applicable): 1.0.0-20160705git3e1e994 How reproducible: Easy, just hover with mouse over time series Actual results: Data is shown as M/D/Y, which can be ambiguous - 8/2/2016 means Aug 2nd or Feb 8th? User cannot change this. Expected results: One or more of: 1. Show date in non ambiguous format like for example the 'date' command (Tue 2 Aug, 2016) 2. Obey browser language settings (en_GB as preferred language means GB date formats) 3. Obey engine host locale setting 4. Let the user set this from some options screen 5. Let the admin set this from some conf file
(In reply to Barak Korren from comment #0) > Expected results: > One or more of: > 1. Show date in non ambiguous format like for example the 'date' command > (Tue 2 Aug, 2016) > 2. Obey browser language settings (en_GB as preferred language means GB > date formats) > 3. Obey engine host locale setting > 4. Let the user set this from some options screen > 5. Let the admin set this from some conf file Dashboard (UI plugin) determines its locale based on WebAdmin UI locale, which reflects the locale selected on oVirt welcome page. Date & DateTime formatting functions are currently not using `Intl.DateTimeFormat` API, this BZ should address this.
Currently, the date/time part renders like: 8/10/2016 9:00:00 PM Can someone please specify the exact date/time format that should be used for sparkline tooltip? Should it be like: - 10 Aug 2016 9:00 PM GMT+2 - Wed, 10 Aug 2016, 9 PM - or anything else? Note: since sparkline data points represent computed average for the given hour, the minute:second part is not relevant (it's always 00:00).
(In reply to vszocs from comment #2) > Currently, the date/time part renders like: 8/10/2016 9:00:00 PM > > Can someone please specify the exact date/time format that should be used > for sparkline tooltip? > > Should it be like: > - 10 Aug 2016 9:00 PM GMT+2 > - Wed, 10 Aug 2016, 9 PM > - or anything else? should be the same across the system- probably we should stick to the event log format unless anyone sees problems with it. > > Note: since sparkline data points represent computed average for the given > hour, the minute:second part is not relevant (it's always 00:00).
With the ECMA-402 Intl API, the exact date/time format used is looked up from CLDR definitions based on the provided locale. We're simply specifying which part of the date & time is to be displayed and the Intl API takes care of the rest. With patch 67076, all the dashboard dates will be formatted according to locale specific formats in the UTC time zone.
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
FailedQA in rhevm-4.1.0.3-0.1.el7.noarch ovirt-engine-dashboard-1.1.0-1.el7ev.x86_64 The dates are localized correctly, however the time is always formatted as 12-hour time, which is not common for all locales. For example time reported for German locale: 31.1.2017, 4:37:00 nachm. GMT The 12h format with vorm./nachm. (a.m./p.m.) is not used in Germany at all. It should be always in 24h format: 16:37:00 GMT The same is for Spanish locale and others. I think the culprit is the line "hour12: true" in https://gerrit.ovirt.org/#/c/67192/1/src/utils/intl.js@125
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
oVirt 4.1.0 GA has been released, re-targeting to 4.1.1. Please check if this issue is correctly targeted or already included in 4.1.0.
Reconfigured the date/time formatter to use the locale default 12-hour clock configuration. This is based on the language selected at login time, and not by the user's browser settings.
Verified in rhevm-4.1.1.2-0.1.el7.noarch ovirt-engine-dashboard-1.1.0-5.el7ev.x86_64 The date and time are now localized correctly, including the 12- or 24-hour format. Sample date & time listing from Dashboard for all locales: en_US: 2/24/2017, 3:30:13 PM GMT de_DE: 24.2.2017, 15:33:47 GMT es_ES: 24/2/2017 15:34:11 GMT fr_FR: 24/02/2017 à 15:34:32 UTC it_IT: 24/2/2017, 15:34:56 GMT ja_JP: 2017/2/24 15:35:15 GMT ko_KR: 2017. 2. 24. 오후 3시 35분 56초 GMT pt_BR: 24/02/2017 15:36:24 GMT zh_CN: 2017/2/24 GMT 下午3:36:44