Possible casing issue with DateTimeFormatter in JDK 15 on

Mark Derricutt mark at talios.com
Sun Apr 17 08:13:37 UTC 2022


 Looks like this is the case.  Setting the Locale specifically resolved my
casing issue. Interestingly tho, where my original test had returned
EST/ESD - under 11+ I ended up with EST/GMT-04:00 in an old day light
savings related test:

expected: "Feb 28, 7:00PM (EST) - Aug 7, 8:00PM 2014 (EDT)"
 but was: "Feb 28, 7:00PM (EST) - Aug 7, 8:00PM 2014 (GMT-04:00)"


[1] says there’s no such Timezone as EDT - yet it seems like it existed in
JDK8 - I assume that was removed at some point?


[1]
https://stackoverflow.com/questions/11129108/converting-edt-time-zone-to-gmt-not-working-fine-in-java

-- 
"Great artists are extremely selfish and arrogant things" — Steven Wilson,
Porcupine Tree


On 14/04/2022 at 9:31:08 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 14/04/2022 09:44, Mark Derricutt wrote:
>
> Hey all,
>
>
> I’ve just been working on finally migrating some of our code to at least,
>
> build UNDER a JDK greater than 8 - and ran into a test case in my code base
>
> that failed relating to (possibly) undocumented changes in the the
>
> DateTimeFormatter.
>
>
> This may be related to the switch to using the CLDR locale data by
> default in JDK 9, more on that in JEP 127 [1] and JEP 252 [2], including
> the system property that you can set to use the older JRE locale data if
> needed.
>
> -Alan
>
> [1] https://openjdk.java.net/jeps/127
> [2] https://openjdk.java.net/jeps/252
>


More information about the discuss mailing list