RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1793501 - Subscription start and end date format in JSON returned by RHSM DBus API is not consistent
Summary: Subscription start and end date format in JSON returned by RHSM DBus API is n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: 8.5
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1947445 1947447
TreeView+ depends on / blocked
 
Reported: 2020-01-21 13:44 UTC by Martin Kolman
Modified: 2021-11-10 07:50 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.28.16-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:37:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2551 0 None closed 1793501: format dates via D-Bus as ISO 6301 2021-04-20 06:10:15 UTC
Github candlepin subscription-manager pull 2570 0 None closed [1.28] 1793501: format dates via D-Bus as ISO 6301 2021-04-20 06:10:15 UTC
Red Hat Bugzilla 1947445 1 unspecified CLOSED Adjust Anaconda to Subscription Manager date formatting fix 2023-06-14 09:09:49 UTC
Red Hat Bugzilla 1947447 1 unspecified CLOSED Adjust Anaconda to Subscription Manager date formatting fix 2023-06-14 09:09:33 UTC
Red Hat Product Errata RHBA-2021:4390 0 None None None 2021-11-09 19:37:46 UTC

Internal Links: 1947445 1947447

Description Martin Kolman 2020-01-21 13:44:27 UTC
Description of problem:
Depending on which DBus method is called, the subscription describing JSON data RHSM returns has different subscription start and end date formatting.

In output from AutoAttach() the date looks like this:
2020-11-04T04:59:59+0000

In output from GetPools() with “pool_subset” -> “consumed”  it looks like this:
11/04/2020 
or 
11/04/20

I have seen the first when calling RHSM DBuS API on an installed system while I'm getting the second one consistently in the installation environment. I guess it'S dependent on the locale, maybe even created with the locale dependent "%x" argument to strftime ? (https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) 

Another issue is that the first format contains data about time while the other does not, so the time data might be getting lost in GetPools() output ?

In any case it would be good to have a single consistent machine readable time formatting across all the JSON data returned by RHSM, preferably using one of the ISO standards for time and date formatting, which should be nowadays widely supported by relevant C & Python libraries. This date and time format should be then also specified in the RHSM DBus API documentation.

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

How reproducible:
always

Steps to Reproduce:
1. register
2. call AutoAttach() & GetPools() over DBUs

Actual results:
Returned dates are in different format.

Expected results:
All returned dates are in the same format.

Comment 10 errata-xmlrpc 2021-11-09 19:37:33 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 (subscription-manager bug fix and enhancement 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.

https://access.redhat.com/errata/RHBA-2021:4390


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