Skip to content

Commit

Permalink
8255239: The timezone of the hs_err_pid log file is corrupted in Japa…
Browse files Browse the repository at this point in the history
…nese locale

Reviewed-by: andrew
Backport-of: b46d73bee808af7891b699df30a5a6dec3f5139f
  • Loading branch information
ktakakuri authored and gnu-andrew committed Apr 2, 2022
1 parent e403fd5 commit c5ca29f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hotspot/src/share/vm/runtime/os.cpp
Expand Up @@ -887,8 +887,12 @@ void os::print_date_and_time(outputStream *st, char* buf, size_t buflen) {

struct tm tz;
if (localtime_pd(&tloc, &tz) != NULL) {
::strftime(buf, buflen, "%Z", &tz);
st->print_cr("timezone: %s", buf);
wchar_t w_buf[80];
size_t n = ::wcsftime(w_buf, 80, L"%Z", &tz);
if (n > 0) {
::wcstombs(buf, w_buf, buflen);
st->print_cr("timezone: %s", buf);
}
}

double t = os::elapsedTime();
Expand Down

1 comment on commit c5ca29f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.