RFR: 8255239: The timezone of the hs_err_pid log file is corrupted in Japanese locale

Calvin Cheung ccheung at openjdk.java.net
Tue Nov 3 18:40:59 UTC 2020


On Tue, 3 Nov 2020 18:15:51 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> After further investigation -- wcsftime is in C99. Also, we use it here only inside `if (localtime_pd(&tloc, &tz) != NULL)`. I supposed any Linux distro that has a minimal of locale support to make that function return non-null would have a working implementation of wcsftime.
>> 
>> So I think this code is OK. The only change I request is to change ` L"%Z"` to `"%Z"`
>
> Upon even more investigation, I was completely wrong :-)
> 
> According https://en.cppreference.com/w/cpp/language/string_literal, the "L" prefix is for `wchar_t` string literals. So your code is correct.

@iklam Thanks for your review and making sure the change is ok.

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

PR: https://git.openjdk.java.net/jdk/pull/1023


More information about the hotspot-runtime-dev mailing list