Something strange happens when I am trying to convert date to a milliseconds. Maybe someone can explain my this:
Calendar calendar = Calendar.getInstance();
calendar.set(2017, 9, 3, 4, 50);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd hh:mm:ss",
Locale.getDefault());
Log.i("tag", formatter.format(calendar.getTime()));
and logcat logs my out:
I/tag: 2017.10.03 04:50:34
Why months are different ?