Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1362402 - dashboard: make the date format of time-series graph in locale specific formats in the UTC time zone
Summary: dashboard: make the date format of time-series graph in locale specific forma...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-dashboard
Classification: oVirt
Component: General
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.1.1
: 1.1.0
Assignee: Scott Dickerson
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 06:56 UTC by Barak Korren
Modified: 2017-04-21 09:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:52:44 UTC
oVirt Team: UX
rule-engine: ovirt-4.1+
mgoldboi: planning_ack+
oourfali: devel_ack+
gklein: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 67078 master MERGED Convert intl.js Date/Time formatting to ECMA-402 Intl API with UTC TZ 2016-11-22 23:32:15 UTC
oVirt gerrit 67192 ovirt-engine-dashboard-1.0 MERGED Convert intl.js Date/Time formatting to ECMA-402 Intl API with UTC TZ 2016-11-23 00:06:55 UTC
oVirt gerrit 71721 master MERGED Change date time format to locale preferred 12 hour clock config 2017-02-06 21:17:53 UTC
oVirt gerrit 71743 ovirt-engine-dashboard-1.1 MERGED Change date time format to locale preferred 12 hour clock config 2017-02-07 22:56:08 UTC

Description Barak Korren 2016-08-02 06:56:42 UTC
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

Comment 1 Vojtech Szocs 2016-08-05 15:15:51 UTC
(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.

Comment 2 Vojtech Szocs 2016-08-10 20:01:55 UTC
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).

Comment 3 Moran Goldboim 2016-09-20 08:26:07 UTC
(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).

Comment 4 Scott Dickerson 2016-11-21 21:32:15 UTC
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.

Comment 5 Sandro Bonazzola 2016-12-12 14:02:36 UTC
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.

Comment 6 Pavel Novotny 2017-02-01 14:01:28 UTC
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

Comment 7 Red Hat Bugzilla Rules Engine 2017-02-01 14:01:34 UTC
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.

Comment 8 Sandro Bonazzola 2017-02-01 16:03:04 UTC
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.

Comment 9 Scott Dickerson 2017-02-08 04:56:27 UTC
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.

Comment 10 Pavel Novotny 2017-02-24 15:59:20 UTC
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


Note You need to log in before you can comment on or make changes to this bug.