On Tue, 21 Sep 2021 16:03:28 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> 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.
>
> The problem I was referring to was not about printing to the console. I 
> hadn't thought about that, I agree the default locale should be used there. I 
> was referring to `Last-modified` HTTP headers with a non-English date value, 
> e.g.:
> 
>     Last-modified: Di., 21 Sep. 2021 09:56:53 GMT
> 
> I think browsers will get confused by this. It probably isn't a big deal 
> since I think the server doesn't implement conditional GETs (i.e. use the 
> last-modified date in subsequent requests), but the HTTP spec is [quite 
> strict ][1] about date formats.
> 
> [1]: https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1

Thanks for clarifying. Yes the date should be in GMT and should not be 
localized when sent in a `Last-Modified` / `Date` headers. Good catch!

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

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

Reply via email to