Closed bonusdev closed 2 years ago
Not reproducible on OpenJDK. Needs more information to reproduce.
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("d MMMM yyyy", Locale.ENGLISH);
String a = dateTimeFormatter.format(LocalDate.of(2022, Month.MARCH, 1));
String b = dateTimeFormatter.format(LocalDate.of(2022, Month.MARCH, 1));
String c = dateTimeFormatter.format(LocalDate.of(2022, Month.MARCH, 1));
System.out.println("a = " + a);
System.out.println("b = " + b);
System.out.println("c = " + c);
outputs
a = 1 March 2022
b = 1 March 2022
c = 1 March 2022
There might be a race condition somewhere, but without more info on the JDK version and OS etc there isn't much to investigate.
Closing due to lack of feedback
so, "a" is "1 3 2022", "b" and "c" is "1 March 2022". I need "1 March 2022" result altime...