The solution is - yyyy must be in lowercase
https://support.pega.com/discussion/do-not-use-yyyy-uppercase-java-date-formatting