Bug 1862084 - Inconsistency of time formats in the OpenShift web-console
Summary: Inconsistency of time formats in the OpenShift web-console
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Linux
Target Milestone: ---
: 4.8.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
: 1930444 1948892 (view as bug list)
Depends On:
Blocks: 1952209
TreeView+ depends on / blocked
Reported: 2020-07-30 12:02 UTC by Kaushal Sathe
Modified: 2024-06-13 22:51 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Fixed an issue where the OpenShift console would use inconsistent time formats in different areas in the UI. Previously, the console would show 12 hour format in most places, and 24 hour format in others. The dates and times are now formatted consistently using the user's locale and language preference. Fixed an issue where the year was not displayed for dates more than a year in the past.
Clone Of:
: 1952209 (view as bug list)
Last Closed: 2021-07-27 22:32:27 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 8490 0 None open [WIP] Bug 1862084: Consistent formatting of dates and times 2021-03-26 19:05:58 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:32:43 UTC

Description Kaushal Sathe 2020-07-30 12:02:16 UTC
Description of problem:

In the OpenShift web-console there is an inconsistency in the time formats shown in the "Overview -- Status" (time format = am/pm) and "Overview -- Activity" (time format = 24 hours) sections.

Version-Release number of selected component (if applicable):
OpenShift version 4.x. However I checked it in 4.3.29 as well as 4.4.12.

How reproducible:

Actual results:
Time format inconsistency

Expected results:
Both the time formats should be same. Either am/pm format or 24 hours format.

Comment 7 Jakub Hadvig 2020-12-23 16:15:42 UTC
We did not have time to fix this issue this sprint. Will reevaluate and try to fix in next sprint.

Comment 8 Rastislav Wagner 2021-01-04 10:13:35 UTC
@jhadvig @spadgett which time format do we want to use ? We use mostly am/pm format but charts and overview events card are using 24hrs.

Comment 9 Samuel Padgett 2021-01-04 19:23:06 UTC
I'd generally suggest am/pm unless there's not enough room to make it fit. Probably we should use the `short` format from `Intl.DateTimeFormat` so it's formatted for the user's locale.


Comment 10 Samuel Padgett 2021-01-04 19:26:30 UTC
Or perhaps moment.js localized format `LT`


Comment 12 Samuel Padgett 2021-03-22 13:34:49 UTC
There is a related fix in https://github.com/openshift/console/pull/8365 where we localize the time formats for the query browser.

Comment 17 Samuel Padgett 2021-04-16 13:47:07 UTC
*** Bug 1948892 has been marked as a duplicate of this bug. ***

Comment 18 Samuel Padgett 2021-04-16 15:28:41 UTC
*** Bug 1930444 has been marked as a duplicate of this bug. ***

Comment 19 Yadan Pei 2021-04-19 06:12:49 UTC
1. Cluster Setting page 'Update history' table shows Completed time with format: Date, Year, Time(im AM/PM format), such as Apr 19, 2021, 7:50 AM
2. Home -> Overview -> Status shows alerts with format: Date, Year, Time(im AM/PM format), such as Apr 19, 2021, 9:53 AM
3. Home -> Overview -> Events also shows events with format: Time(in AM/PM format), such as 9:58 AM
4. For projects creation date, node creation date, we use format: Date, Year, Time(im AM/PM format), such as Apr 19, 2021, 7:34 AM with Year included

It looks like every place is using consistent time format and working as expected. 

Going to move the bug to VERIFIED, this is checked against 4.8.0-0.nightly-2021-04-18-101412

Comment 29 errata-xmlrpc 2021-07-27 22:32:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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