Actions
Bug #18437
closedProduct Create scarcely fails with InvalidFormatException in candlepin
Difficulty:
Triaged:
Bugzilla link:
Description
The problem seems to be in using DateTime in json in https://github.com/Katello/katello/blob/aad62cc6dae670565218f7434a4e908550244b41/app/lib/katello/resources/candlepin.rb#L686
It seems ActiveSupport's DateTime has some issues with formating the time.
It's not that hard to get an invalid date with it (with 1000 on milisends)
x = nil; 100000.times { x = (DateTime.now + 10_950.days).to_json; break unless x.size == 31 }; puts x # => "2047-02-01T23:42:09.1000+01:00"
Using Time doesn't seem to have the problem
x = nil; 100000.times { x = (Time.now + 10_950.days).to_json; break unless x.size == 31 }; puts x # = "2047-02-01T23:42:50.906+01:00"
Updated by Ivan Necas almost 8 years ago
- Subject changed from Product Create scarcely fails with InvalidFormatException in candlepin to Product Create scarcely fails with InvalidFormatException in candlepin
- Description updated (diff)
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ivan Necas
- Pull request https://github.com/Katello/katello/pull/6594 added
Updated by Ivan Necas almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|6d0b4130ac35889410e137a1d7a7fb638cf3f5d8.
Updated by Eric Helms almost 8 years ago
- Translation missing: en.field_release set to 188
Updated by The Foreman Bot almost 8 years ago
- Pull request https://github.com/Katello/katello/pull/6617 added
Actions