for me. The problem is that oval_lib.py::create_usn_definition()
pulls the published timestamp from the USN db via
datetime.datetime.fromtimestamp without a timezone, so python converts
it to your local timezone.
The right way to fix this is to set the timezone
to datetime.timezone.utc explicitly as an argument to
datetime.datetime.fromtimestamp() but python2.7 doesn't have that
and makes it non-trivial to use a tzinfo timezone without using a
third-party library.
Converting oval_lib.py to use datetime.datetime.utcfromtimestamp()
instead would likely address this in the short term, but people
*should* be using oval info from the public vm where python3 is used.
Hi,
The changes in:
1e13b6edc8 ("Fix test test_create_ dict_from_ cve_file" )
On Fri, Oct 29, 2021 at 03:13:31PM -0000, Eduardo Barretto wrote: Medium< /severity> /wiki.ubuntu. com/SecurityTea m/KnowledgeBase /SRBDS</ref>
> <advisory <email address hidden>">
> <severity>
> - <issued date="2020-06-09"/>
> + <issued date="2020-06-10"/>
> <ref>https:/
> </advisory>
> <advisory <email address hidden>"> Medium< /severity> /wiki.ubuntu. com/SecurityTea m/KnowledgeBase /SRBDS</ref>
> <severity>
> - <issued date="2020-06-09"/>
> + <issued date="2020-06-10"/>
> <ref>https:/
> </advisory>
ends up breaking the tests:
TestOvalLibUn it::test_ create_ usn_definition it::test_ invalid_ priority_ usn_definition
TestOvalLibUn
for me. The problem is that oval_lib. py::create_ usn_definition( ) datetime. fromtimestamp without a timezone, so python converts
pulls the published timestamp from the USN db via
datetime.
it to your local timezone.
The right way to fix this is to set the timezone timezone. utc explicitly as an argument to datetime. fromtimestamp( ) but python2.7 doesn't have that
to datetime.
datetime.
and makes it non-trivial to use a tzinfo timezone without using a
third-party library.
Converting oval_lib.py to use datetime. datetime. utcfromtimestam p()
instead would likely address this in the short term, but people
*should* be using oval info from the public vm where python3 is used.
Thanks.
--
Steve Beattie
<email address hidden>