I'm failing at setting the time for my event. It just does not get preset. This is my code:

private void makeCalendarEvent() { int year, month, month1, month2, day; day = Integer.parseInt(Character.toString(date.charAt(4)) + Character.toString(date.charAt(5))); month1 = Integer.parseInt(Character.toString(date.charAt(7))); month2 = Integer.parseInt(Character.toString(date.charAt(8))); year = Integer.parseInt(Character.toString(date.charAt(10)) + Character.toString(date.charAt(11))); Log.e("month", String.valueOf(month1 + month2)); Log.e("year", String.valueOf(year)); Log.e("day", String.valueOf(day)); switch (month2) { case 1: if (month1 == 1) { month = Calendar.NOVEMBER; } else { month = Calendar.JANUARY; } break; case 2: if (month1 == 1) { month = Calendar.DECEMBER; } else { month = Calendar.FEBRUARY; } break; case 3: month = Calendar.MARCH; break; case 4: month = Calendar.APRIL; break; case 5: month = Calendar.MAY; break; case 6: month = Calendar.JUNE; break; case 7: month = Calendar.JULY; break; case 8: month = Calendar.AUGUST; break; case 9: month = Calendar.SEPTEMBER; break; case 10: month = Calendar.OCTOBER; break; default: month = Calendar.JANUARY; } Log.e("calendar", String.valueOf(month)); Calendar beginTime = Calendar.getInstance(); beginTime.clear(); beginTime.set(20 + year, month, day, 23, 0); Calendar endTime = Calendar.getInstance(); endTime.clear(); endTime.set(20 + year, month, day + 1, 5, 0); Intent intent = new Intent(Intent.ACTION_INSERT) .setData(CalendarContract.Events.CONTENT_URI) .putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, beginTime.getTimeInMillis()) .putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endTime.getTimeInMillis()) .putExtra(CalendarContract.Events.TITLE, head) .putExtra(CalendarContract.Events.DESCRIPTION, body) .putExtra(CalendarContract.Events.EVENT_LOCATION, "Club Douala Ravensburg"); startActivity(intent); }

Output from my Logs:

03-13 22:34:28.787 6919-6919/? E/month﹕ 3 03-13 22:34:28.787 6919-6919/? E/year﹕ 14 03-13 22:34:28.787 6919-6919/? E/day﹕ 13 03-13 22:34:28.787 6919-6919/? E/calendar﹕ 2

So Month , Day , Hour and Minute do not get set. Don't know about Year but I guess thats ignored too

Any ideas what i am doing wrong?