Project

General

Profile

Actions

Bug #28429

closed

Last Checkin Time from Content Hosts Page is no longer UTC time

Added by Ian Ballou over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1774881

Description of problem:
Last Checkin Time from Content Host Page is no longer UTC time

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

How reproducible:
100%

Steps to Reproduce:
After registering a content host, the "Last Checkin" time should be in UTC. (Katello 3.12 behavior)

Actual results:
"Last Checkin" time is in local time.

Additional info:

Need to confirm if this change was intentional.

Actions #1

Updated by Ian Ballou over 4 years ago

  • Subject changed from Last Checkin Time from Content Hosts Page is no longer UTC time to Last Checkin Time from Content Hosts Page is no longer UTC time

I was able to reproduce this on master even with config.time_zone = 'UTC' in foreman/config/application.rb. Seems like this was unintentional since the configured time is being ignored.

Actions #2

Updated by Ian Ballou over 4 years ago

This bug occurs for content views in their history too. Probably in other places as well.

Actions #3

Updated by Ian Ballou over 4 years ago

<td bst-table-cell><short-date-time date="history.created_at" /></td>

The above should return UTC but it doesn't, so the culprit might be short-date-time.

Actions #4

Updated by Ian Ballou over 4 years ago

There are a number of issues related to time that I found in master Foreman/Katello:
1) On the dashboard, the "Generated at" time no longer appears. Only "Generated at".
-> The time does appear correctly in the HTML but it isn't rendered.
-> The time follows the "timezone" session cookie if the time zone isn't explicitly set.
-> Seems to be the only time that follows the correct behavior.

2) Times in the Smart Proxy logs are all blank.
-> In the HTML, the times are there, but they are incorrectly set to UTC no matter the user time zone setting.
-> Changing the "timezone" cookie doesn't make a difference either.

3) Times in content view history and content hosts "Last Checkin" are "Invalid Date" if the user time zone is set to UTC.
-> However, the time does follow the cookie time zone correctly.
-> JS Error:

[React Intl] Error formatting relative time.
RangeError: The date value provided to IntlRelativeFormat#format() is not in valid range. 
    in LongDateTime (created by I18nProviderWrapper(LongDateTime))
    in I18nProviderWrapper(LongDateTime) backend.js:6:2315
    r backend.js:6
    defaultErrorHandler index.es.js:518
    formatRelative index.es.js:741
    LongDateTime LongDateTime.js:10
    React 9
    unstable_runWithPriority scheduler.development.js:643
    React 6
    I18nProviderWrapper i18nProviderWrapperFactory.js:19
[React Intl] Error formatting date.
RangeError: date value is not finite in DateTimeFormat.format() 
    in FormattedDate (created by LongDateTime)
    in LongDateTime (created by I18nProviderWrapper(LongDateTime))
    in I18nProviderWrapper(LongDateTime) backend.js:6:2315
    r backend.js:6
    defaultErrorHandler index.es.js:518
    formatDate index.es.js:685
    render index.es.js:1097
    React 9
    unstable_runWithPriority scheduler.development.js:643
    React 6
    I18nProviderWrapper i18nProviderWrapperFactory.js:19

Actions #5

Updated by Ian Ballou over 4 years ago

This PR caused Katello to no longer show times in UTC only: https://github.com/theforeman/foreman/pull/7067

Actions #6

Updated by Ian Ballou over 4 years ago

  • Status changed from New to Rejected

Rejecting since it's NOTABUG

Actions

Also available in: Atom PDF