It's been a long day and my brain is tired so maybe I'm completely missing something, but how come when I run this line,
System.out.println(
DateTimeFormatter.ofPattern("YYYYMMdd")
.withZone(ZoneId.of("UTC"))
.format(Instant.parse("2020-12-31T08:00:00Z"))
)
)
I get 20211231
instead of 20201231
? Where does the extra year come from?