Convert times to UTC#631
Conversation
The SLSA provenance prescribes that the Timestamp data types must be in UTC time zone. It can happen that the environment where Chains controller is running is not set to the UTC time zone, and in that case the `predicate.metadata.buildStartedOn` and `predicate.metadata.buildFinishedOn` will be set with the local time zone. This is due to apimachinery converting `time.Time` values into local timezone on JSON unmarshall. This forces all dates to the UTC time zone. Fixes tektoncd#630
|
Hi @zregvart. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
|
The following is the coverage report on the affected files.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wlynch The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
The SLSA provenance prescribes that the Timestamp data types must be in UTC time zone. It can happen that the environment where Chains controller is running is not set to the UTC time zone, and in that case the
predicate.metadata.buildStartedOnandpredicate.metadata.buildFinishedOnwill be set with the local time zone. This is due to apimachinery convertingtime.Timevalues into local timezone on JSON unmarshall.This forces all dates to the UTC time zone.
Fixes #630
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes