RFR: 8357828: Add a timestamp to jcmd diagnostic commands [v2]

Alan Bateman alanb at openjdk.org
Wed Jan 21 07:25:57 UTC 2026


On Wed, 21 Jan 2026 06:00:18 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > The choice for time format is "yyyy-MM-dd HH:mm:ss" as it is already used in Thread.print.
> 
> That could be seen as a poor choice by `Thread.print`. The `VMUptimeDCmd` uses `OutputStream::date_stamp()` which in turn uses `os::iso8601_time`, which is also what the `time` decorator for UL uses.

For anything new then we should try to use ISO 8601 unless there is a good reason to do otherwise. 

The "yyyy-MM-dd HH:mm:ss" format, seen in the jstack and jcmd Thread.print output, seems to go back a long way. I wonder how risky it would be change that now.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27368#issuecomment-3776554080


More information about the hotspot-runtime-dev mailing list