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

[MRRESOURCES-135] Show projectTimespan year in UTC #39

Merged
merged 1 commit into from
Aug 28, 2023

Commits on Aug 23, 2023

  1. Show projectTimespan year in UTC

    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`).
    raboof committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b8c0005 View commit details
    Browse the repository at this point in the history