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

Need option to use current time zone in generating timestamp. #75

Open
garretwilson opened this issue Mar 3, 2019 · 4 comments
Open

Comments

@garretwilson
Copy link

If I'm doing a Maven build, I want to generate a property using the timestamp-property in the format yyyy-MM-dd, but I want it to reflect the current time zone of the machine doing the build. (Thus I want it equivalent to a LocalDate saying what date the build was performed on; the time zone is irrelevant.)

But currently the timeZone defaults to GMT. Instead, the timeZone should default to the current JVM time zone to reflect the time zone of the build. If the developer wants to use GMT, they can specify that in the timeZone value.

As it stands, there is no way for the developer to indicate that the timestamp should be determined based upon the current JVM time zone.

@garretwilson
Copy link
Author

Or is the documentation incorrect when it indicates that the default value is GMT? And I don't know what issue #61 is talking about when it refers to a timeSource.

@garretwilson
Copy link
Author

garretwilson commented Oct 26, 2022

Can we reopen this? I don't see that this was ever addressed. Let's say that I have this:

<execution>
  <id>set-build-date</id>
  <goals>
    <goal>timestamp-property</goal>
  </goals>
  <configuration>
    <locale>en</locale>
    <timeSource>build</timeSource>
    <timeZone>UTC</timeZone>
    <name>build.date</name>
    <pattern>yyyy-MM-dd</pattern>
  </configuration>
</execution>

I want this to show the date the build was started. But if I'm sitting in Miami, Florida working late on 2021-02-03, it's already 2021-02-04 in UTC. (That's just one example.) I want the build date to indicate 2021-02-03; thus timeZone should default to the current JVM time zone if I don't specify anything.

The need here is different based upon the pattern. If I want a full timestamp, then yes I would want UTC. (I don't think I would every want GMT, which is effectively obsolete.)

@slachiewicz slachiewicz reopened this Oct 26, 2022
@github-actions github-actions bot removed the Stale label Oct 27, 2022
@github-actions github-actions bot added the Stale label Oct 28, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@garretwilson
Copy link
Author

I notice that all these issues that I have posted keep getting closed by the bot repeatedly over the years, with no sign that any human has looked into them.

Could I ask if this project is still active?

@slachiewicz slachiewicz removed the Stale label Nov 4, 2023
@slachiewicz slachiewicz reopened this Nov 4, 2023
@slachiewicz
Copy link
Member

Hi, yes this project is active and volunteers do pr review

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

2 participants