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

Make useGitCommitTimestamp independent of local time zone #168

Open
1 task done
johanblumenberg opened this issue Dec 20, 2021 · 0 comments
Open
1 task done

Make useGitCommitTimestamp independent of local time zone #168

johanblumenberg opened this issue Dec 20, 2021 · 0 comments

Comments

@johanblumenberg
Copy link

johanblumenberg commented Dec 20, 2021

Issue

version: 1.9.0
usage context:

  • maven command line: 3.8.3

Problem description:

Currently, when using <useGitCommitTimestamp> to add the commit timestamp to the generated version, the timestamp is added in the current locale of the machine where the build is done.
This is a problem because the version becomes different for different developers. Everyone must be able to agree on which version a certain commit has.

Proposals

Suggesting to add another configuration to set which time zone to use, which can be set to the current time zone by default to keep backwards compatibility. Since we live in a global world where many companies and teams are spread across time zones it would make more sense to use UTC by default, but this I guess would be a breaking change.

Another idea would be to configure timestamps as <useGitCommitTimestamp>UTC</useGitCommitTimestamp>, not to have to introduce another configuration. Passing true would give the current behaviour of local time zone.

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

No branches or pull requests

1 participant