Bug #22952

Account for different datetime format in Suse errata

Added by Jake Callahan about 5 years ago. Updated almost 5 years ago.

Errata Management
Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


Suse uses a different datetime format than what Katello currently expects. Instead of a formatted data and time, they use seconds since Epoch. This is preventing Katello from correctly parsing the date, leading to a blank entry.

Further, it looks like the issue happens during or before the values are stored in the katello_errata table.
id | uuid | errata_id | created_at | updated_at | issued | updated | errata_type | severity |
1 | 003a57f6-48e7-4752-aa07-7c62ac288d17 | openSUSE-2017-1284 | 2018-03-19 13:54:40.547011 | 2018-03-19 13:54:40.552124 | | | recommended | moderate |

Example: <issued date="1519129773" />

Suse's documentation on their updateinfo metadata:

Verification steps:
1. Sync a suse repository that contains errata.
2. Check that the issued and updated dates (if applicable) show up correctly in the UI/CLI/API

Associated revisions

Revision 2e718b8b (diff)
Added by John Mitsch about 5 years ago

Fixes #22952 - Handle SUSE errata's epoch dates

SUSE errata dates are stored in pulp as seconds since epoch dates,
whereas Red Hat errata dates are formatted date strings. Since pulp
stores these "as-is" in a string, we need to convert the epoch date
to a formatted date string in the indexing step, so the epoch date
can be stored in our "issued" and "updated" database fields for
Erratum, which are date type fields.


#1 Updated by Justin Sherrill about 5 years ago

  • Difficulty set to easy
  • Legacy Backlogs Release (now unused) set to 284
  • Target version set to 245

#2 Updated by John Mitsch about 5 years ago

  • Assignee set to John Mitsch

#3 Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request added

#4 Updated by John Mitsch about 5 years ago

  • Legacy Backlogs Release (now unused) changed from 284 to 352

#5 Updated by John Mitsch about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF