Why code
Date time1 = new SimpleDateFormat("HH:mm", Locale.US).getCalendar().getTime();
return wrong year?
Mon Dec 12 08:49:57 GMT+03:00 1938
Why is 1938?
Why code
Date time1 = new SimpleDateFormat("HH:mm", Locale.US).getCalendar().getTime();
return wrong year?
Mon Dec 12 08:49:57 GMT+03:00 1938
Why is 1938?
Because SimpleDateFormat("HH:mm", Locale.US).getCalendar()
has something to do with Serialization which causes the problem
Check this answer
Use
Date currentTime = Calendar.getInstance().getTime();