diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp index 14b314554aa..1061ff444fd 100644 --- a/hotspot/src/share/vm/runtime/os.cpp +++ b/hotspot/src/share/vm/runtime/os.cpp @@ -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();