Bug 1739225 - Timestamp component always shows dates in the future as relative dates
Summary: Timestamp component always shows dates in the future as relative dates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.2.0
Assignee: David Taylor
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-08 19:14 UTC by David Taylor
Modified: 2019-10-16 06:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:35:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 2341 0 None None None 2019-08-13 16:28:51 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:35:27 UTC

Description David Taylor 2019-08-08 19:14:42 UTC
Description of problem:

A bug in the standard Timestamp component. We're trying to show dates within the last 10 minutes or so as relative time, but we're not expecting dates in the future. 


Version-Release number of selected component (if applicable):

4.2

How reproducible:

Always

Steps to Reproduce:
1. Enable Metering and Create Chargeback Reports
2. Under Administration -> Chargeback, see Report Ending date
3. Drill into a chargeback report, see Usage table Period End date

Actual results:

'5 months from now'

Expected results:

'Dec 30, 2018 7:00 pm'

Additional info:


Suggest add an optional prop like noRelative to Timestamp to force full dates

Comment 2 Yadan Pei 2019-08-19 05:49:11 UTC
1. Cluster admin enables Metering, goes to Administration -> Chargeback
2. Create report using example YAML with reportingEnd set as '2019-12-30T23:59:59Z'
apiVersion: metering.openshift.io/v1alpha1
kind: Report
metadata:
  name: namespace-memory-request
  namespace: openshift-metering
spec:
  query: namespace-memory-request
  reportingStart: '2019-01-01T00:00:00Z'
  reportingEnd: '2019-12-30T23:59:59Z'
  runImmediately: true
3. After report is created, Reporting End value shows "Dec 31, 7:59 am", when hover it shows "2019-12-30T23:59:59.0000Z"


I think the 'Reporting End' is showing wrong date.

Comment 3 Samuel Padgett 2019-08-19 12:54:10 UTC
That looks correct assuming you are UTC+8. We convert the UTC date into the user's timezone for display, but show the raw UTC value on hover.

Comment 4 Yadan Pei 2019-08-20 05:27:32 UTC
That sounds good, moving to VERIFIED

Comment 5 errata-xmlrpc 2019-10-16 06:35:17 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, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2019:2922


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