Possible casing issue with DateTimeFormatter in JDK 15 on

Mark Derricutt mark at talios.com
Thu Apr 14 08:44:57 UTC 2022

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

In this case, it’s triggered when using the AM/PM specifier - such as in
h:mma - under JDK8 and JDK11 this renders out as PM but, in 15/16/17/18
this renders as pm.

The docs on
show PM as an *example*, but doesn’t specifically call out casing.

I’ve thrown a simple JBang based class/test on


$ jbang run DateFormatTest.java
Oct 2, 12:20PM (Z)


$ jbang run DateFormatTest.java
Oct 2, 12:20pm (Z)
Formatting failed

Is this a bug, an undocumented change, something I’m overthinking to much
over and I should just adjust my tests to ignore case?


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

More information about the discuss mailing list