Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1739225

Summary: Timestamp component always shows dates in the future as relative dates
Product: OpenShift Container Platform Reporter: David Taylor <dtaylor>
Component: Management ConsoleAssignee: David Taylor <dtaylor>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:35:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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