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

go mod pseudo version uses wrong timestamp #186

Closed
sttts opened this issue Jun 19, 2019 · 7 comments
Closed

go mod pseudo version uses wrong timestamp #186

sttts opened this issue Jun 19, 2019 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@sttts
Copy link
Contributor

sttts commented Jun 19, 2019

We use TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format:%Y%m%d%H%M%S' --abbrev=12 to get the time stamp of the last commit. But this does not work, TZ=GMT has no influence and we get (probably) the timezone of the last commit.

@sttts
Copy link
Contributor Author

sttts commented Jun 19, 2019

/cc @liggitt

@nikhita
Copy link
Member

nikhita commented Jun 19, 2019

It needs to be TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format-local:%Y%m%d%H%M%S' --abbrev=12

@liggitt
Copy link
Member

liggitt commented Jun 19, 2019

https://stackoverflow.com/a/41032442/54696 might work

edit: beat me to it

@sttts
Copy link
Contributor Author

sttts commented Jun 19, 2019

I tried the -local variants and it did not help.

TZ=UTC git show -q --pretty='format:v0.0.0-%cd-%h' --date='format-local:%Y%m%d%H%M%S' --abbrev=12

does the trick.

@nikhita
Copy link
Member

nikhita commented Jun 19, 2019

Added a commit c68dece to fix this in #185

@nikhita nikhita added the kind/bug Categorizes issue or PR as related to a bug. label Jun 19, 2019
@nikhita
Copy link
Member

nikhita commented Jun 20, 2019

Fixed in #185

/close

@k8s-ci-robot
Copy link
Contributor

@nikhita: Closing this issue.

In response to this:

Fixed in #185

/close

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants