I have date like string 200901
On android device I convert it to date:
private static final SimpleDateFormat CARD_DATE_FORMAT = new SimpleDateFormat("yyMMdd", Locale.getDefault());
public static Date toCardDateFormat(String date) {
try {
return CARD_DATE_FORMAT.parse(date);
} catch (ParseException e) {
return null;
}
}
and I get date: Tue Sep 01 00:00:00 GMT+07:00 2020
After that I pass this date to spring controller and in controllers method I have this date like: Mon Aug 31 20:00:00 GMT+03:00 2020