A SLSA predicate object contains run details, which itself contains some build metadata (start and end times).
A BuildMetadata class is thus initialized with two timestamps. Those timestamps are check and transformed to UTC timezone timestamps.
Unfortunately the timezone transformation was erasing the timestamp itself.
By using datetime.astimezone() method (and not datetime.utcnow() anymore), the test failure is fixed. To make sure this does not happen anymore, a time sleep has been added in some tests.
A SLSA predicate object contains run details, which itself contains some build metadata (start and end times).
A
BuildMetadata
class is thus initialized with two timestamps. Those timestamps are check and transformed to UTC timezone timestamps.Unfortunately the timezone transformation was erasing the timestamp itself.
By using
datetime.astimezone()
method (and notdatetime.utcnow()
anymore), the test failure is fixed. To make sure this does not happen anymore, a time sleep has been added in some tests.Fixes https://github.com/AdaCore/e3-core/issues/668