val date_formatter = java.time.format.DateTimeFormatter.ofPattern(“YYYYMMdd”)
tmp = (new DateTimeType).getZonedDateTime(ZoneId.systemDefault()).minusMinutes(2).format(date_formatter)
shows since today wrong year.
Yesterday output had been 20251228
Today output is 20261229
Date and timezone, everything is correct.
I have no idea why year is already next one.
Crazy: If i change to
val date_formatter = java.time.format.DateTimeFormatter.ofPattern(“YYYYMMdd”)
tmp = (new DateTimeType).getZonedDateTime(ZoneId.systemDefault()).minusMinutes(2).minusYears(1).format(date_formatter)
it shows 20241229.
So no way to get exact string 20251229