2
I’m developing a method where I can get the date, month and year, to create a security key to connect to the server. Only I already checked the date of my emulator and my mobile phone is correct, but the month comes with previous month.
My code is as follows.
Calendar c = new Calendar.getIntance();
int ano = c.get(Calendar.YEAR);
int dia =c.get(Calendar.DAY_OF_MONTH);
int mes = c.get(Calendar.MONTH);
Has anyone been through this problem with the Calendar
?
The year and day is coming right, only the month is coming with a previous month.