Skip to content

[art:build-info] Fix timezone issue on timestamp and regex assert#223

Merged
czoido merged 3 commits intomainfrom
danimtb/fix-bi-date
Dec 3, 2025
Merged

[art:build-info] Fix timezone issue on timestamp and regex assert#223
czoido merged 3 commits intomainfrom
danimtb/fix-bi-date

Conversation

@danimtb
Copy link
Member

@danimtb danimtb commented Nov 26, 2025

closes #219

# from here: https://github.com/jfrog/build-info-go/blob/9b6f2ec13eedc41ad0f66882e630c2882f90cc76/buildinfo-schema.json#L63
if not re.match(r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}(Z|[+-]\d{4})$', formatted_time):
raise ValueError("Time format does not match BuildInfo required format.")
assert re.match(r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}(Z|[+-]\d{4})$', formatted_time), \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, bit note that upstream has this same bug! https://github.com/jfrog/build-info-go/blob/main/buildinfo-schema.json#L63 shows
^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}(Z|[+-]\\d{4})$

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czoido czoido merged commit 138f777 into main Dec 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

art:build-info timestamp bug

3 participants