Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the 'current' year in the `projectTimespan` (used for example in https://github.com/apache/maven-apache-resources/blob/master/jar/src/main/resources/META-INF/NOTICE.vm#L21 ) in UTC. By default, `SimpleDateFormat` formats the `java.util.Date` (which does not carry a timezone) in the 'current' timezone. This is not reproducible, as when `project.build.outputTimestamp` is set to a time close to new years', two builds in different timezones may produce a different year. This change makes sure the year is shown in UTC. This especially makes sense when `project.build.outputTimestamp` is given in seconds since epoch, since epoch is defined to be given relative to 00:00:00 UTC on Thursday, 1 January 1970. It is also likely the most common timezone when specifying `project.build.outputTimestamp` as a date. I did not introduce a new unit test to test this behaviour, but I did update an existing test to be more likely to fail in this case (specifically, when building with for example `TZ=GMT-7`).
- Loading branch information