Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize timezones in JSON output #73

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

puerco
Copy link
Member

@puerco puerco commented Dec 5, 2023

This PR overrides the marshaling functions of the statement and vex.VEX object to normalize the timezones to Zulu and comply better with the in-toto predicate guidelines:

Timestamps SHOULD use RFC 3339 syntax with timezone "Z" and SHOULD clarify the meaning of the timestamp. For example, a field named timestamp is too ambiguous; a better name would be builtAt or allowedAt or scannedAt.

This is not a breaking change. It is just setting the timezones, no data loss or format changes are involved:

Format Before:

"timestamp": "2023-08-15T19:55:22.076684217-06:00"

Format After: (not the same date, just to contrast the TZ)

"timestamp": "2023-12-05T05:06:38.099731287Z"

Signed-off-by: Adolfo García Veytia (Puerco) [email protected]

@puerco puerco added enhancement New feature or request go Pull requests that update Go code labels Dec 5, 2023
@puerco puerco requested a review from cpanato December 5, 2023 05:36
This commit overrides the marshaling functions of the statement and
vex.VEX object to normalize the timezones to Zulu and comply better
with the in-toto guidelines (see https://github.com/in-toto/attestation/blob/main/docs/new_predicate_guidelines.md)

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@puerco puerco merged commit cc8ea23 into openvex:main Dec 5, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants