Thanks.
Today I spent some time figuring out how to make the timestamp format pattern configurable. To maintain backward compatibility, the default format pattern is set to an empty string (""). When the format pattern is empty, the timestamp is not formatted, and the files render as they did previously.
I have prepared the following help text for the Timestamp Format field in the Global Configuration. Please review to ensure this aligns with the desired behavior.
The system clock time format defines how timestamps will be rendered. The JDK SimpleDateFormat pattern is used.
When this field is left empty, the default internal Jenkins timestamp format will be used. The Timestamper plugin must be installed if this field is not empty.
Note: Any changes to the time format will only affect future builds. The Log Parser plugin applies the timestamp format during the build process.
Please ensure that the format string is a valid SimpleDateFormat pattern.
Examples of valid formats include:
- HH:mm:ss - Displays hours, minutes, and seconds.
- yyyy-MM-dd HH:mm:ss - Displays the date and time up to seconds.
mreinhardt Please let me know if am on the right track.
The biggest issue for me is that the users are confused due to the offset in the observed time in the LogParser and the console output with timestamper.
The reason is that the LogParser shows the time from the Jenkins logfile which is in UTC format while the console shows the time corrected for your timezone.
The timestamper plugin seems to provide a way to be used by other plugins:
Other plugins can add a dependency on the Timestamper plugin and then use the TimestamperAPI#read method to retrieve the timestamps.
mreinhardt I can have a look to to check if I can add the mentioned dependency. Are you open for such a patch?