On Tue, 21 Sep 2021 15:06:09 GMT, Hannes Wallnöfer <[email protected]> wrote:
>> test/jdk/com/sun/net/httpserver/simpleserver/SecurityManagerTest.java line
>> 198:
>>
>>> 196:
>>> 197: static final DateTimeFormatter HTTP_DATE_FORMATTER =
>>> 198: DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss v");
>>
>> I think this and other usages of `DateTimeFormatter.ofPattern` need to be
>> called with `Locale.US` (or something similar) as second argument, otherwise
>> the current default locale will be used. I noticed because on my laptop the
>> `Last-modified` header contains a german date.
>
> I just realized I commented on a test file, while the actual culprit is in
> `FileServerHandler.java`. But I guess it applies to all usages of this class
> and method.
Hmm... When printing messages on the console don't we want a localized date? Or
are you referring to other usages of the date formatter? Worth double checking
in any case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5505