change timestamp format to ISO 8601

This commit is contained in:
Ivan Bereziuk 2026-01-22 12:22:42 +01:00
parent aa1d92cc88
commit 1047677b87
2 changed files with 2 additions and 7 deletions

View File

@ -417,11 +417,6 @@ static JcmdOptions parse_common_options(const CmdLine& line, stringStream *updat
}
static void print_local_time(outputStream* output) {
char buf[32];
output->print_cr("%s", os::local_time_string(buf, sizeof(buf)));
}
void DCmd::Executor::parse_and_execute(const char* cmdline, char delim, TRAPS) {
if (cmdline == nullptr) return; // Nothing to do!
@ -470,7 +465,7 @@ void DCmd::Executor::parse_and_execute(const char* cmdline, char delim, TRAPS) {
command->parse(&line, delim, CHECK);
if (options.timestamp) {
print_local_time(_out);
_out->date_stamp(true, "", "\n");
}
execute(command, CHECK);

View File

@ -33,7 +33,7 @@ import jdk.test.lib.process.OutputAnalyzer;
/*
* @test
* @summary test jcmd generic flag "-t" to make sure dignostic coommand is timestamped
* @summary test whether jcmd generic flag "-t" adds a timestamp to the output
* @library /test/lib
* @run main/othervm TestJcmdTimestamp
*/