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

For build date use Go-compatible RFC3339 date format, fixes update check #259

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

Gerrit91
Copy link
Contributor

@Gerrit91 Gerrit91 commented Sep 13, 2023

Unfortunately, GNU date produces a date with the --rfc-3339=seconds that Golang cannot parse with it's RFC3339 format definition.

Instead we need to use the --iso-8601=seconds flag, which is at least parsable with Go.

Here I demonstrate the behavior: https://go.dev/play/p/FSXBzJcqpUA

There is also a good blog article talking about this issue and where it comes from: https://utcc.utoronto.ca/~cks/space/blog/unix/GNUDateAndRFC3339

Other repositories where we need to apply this change to:

  • metal-stack/metalctl (important as update check is now broken)
  • metal-stack/backup-restore-sidecar
  • metal-stack/metal-api
  • metal-stack/masterdata-api

The bug was introduced in this commit: https://github.com/fi-ts/cloudctl/pull/248/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

Closes #258.

@Gerrit91 Gerrit91 changed the title For build date use Go-compatible RFC3339 date format. For build date use Go-compatible RFC3339 date format, fixes update check Sep 13, 2023
@Gerrit91 Gerrit91 marked this pull request as ready for review September 13, 2023 07:58
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.

v0.12.3: cloudctl update check returns an error while parsing the timestamp
2 participants