jgitver / jgitver/jgitver-maven-plugin

Make useGitCommitTimestamp independent of local time zone

Open
#168 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
166
Forks
42
PR merge metrics
No merged PRs in 30d

Description

## Issue

**version**: 1.9.0
**usage context**:
- [x] maven command line: 3.8.3

**Problem description**:

Currently, when using `` 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 `UTC`, not to have to introduce another configuration. Passing `true` would give the current behaviour of local time zone.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.