-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Document expected format for commit.time and build.time in git.properties #10392
Comments
Sorry, I don't understand the problem that you're trying to report. The time is deliberately converted to epoch time so that it's in a consistent format. This time is then exposed as a Can you please describe your problem in more detail? A detailed description of the behaviour that you are seeing and the behaviour that you expect to see would be useful. A failing test case would be even better. |
Sure, I can describe the case. So if I provide any correct dateFormat to my gradle.properties file, I'm basically getting what I'm expecting. For example, for dateFormat = "yyyy-MM-dd'T'HH:mmZ", I've got such json from my /info endpoint: But for one specific dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ", spring-boot formats my time to currentTimeMillis: If it is difficult to change this behavior to more predictable due to compatibility issues, may be it is possible to provide 2 fields in resulting json: 1st is changed and 2nd - unchanged? |
Thanks, I think I understand what's happening now. Boot's When the commit time doesn't match the expected format it's left as-is and as a String. With When you use Given that both the Maven and Gradle plugins for generating |
For this specific date format GitProperties converting it back to timestamp, so it's not possible to format my git commit date with this template.
spring-boot/spring-boot/src/main/java/org/springframework/boot/info/GitProperties.java
Line 106 in 4a8d353
The text was updated successfully, but these errors were encountered: