I get a dateformat from wicket which Java can't convert:
Mon Apr 20 00:00:00 CEST 2020
The problem is that CEST is not a timezone Java supports. I've tried CST what should work but it doesn't. Error is:
Unparseable date: "Mon Apr 20 00:00:00 CST 2020"
Code:
DateFormat dateFormat = new SimpleDateFormat(
"yyyy-MM-dd", Locale.GERMANY);
dateFormat.parse("Mon Apr 20 00:00:00 CST 2020");
System.out.println(dateFormat.format(new Date()));
I need to convert this date in a JSON-Format so yyyy-MM-dd.
How can I do this?