Java starts counting months at zero, fix this in the log output

smack4 5462
Ingo Bauersachs 11 years ago
parent 82f34bc4e4
commit 2d790ea4f0

@ -50,7 +50,7 @@ public synchronized String format(LogRecord record)
//current time
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minutes = cal.get(Calendar.MINUTE);

Loading…
Cancel
Save