void () { myCurrentCalendar = Calendar.getInstance(); myCurrentCalendar.setTimeInMillis(0); // +- seconds etc myCurrentCalendar.set(Calendar.HOUR, 0); myCurrentCalendar.set(Calendar.MINUTE, 0); myTimeToRecalculateAfter = myCurrentCalendar.getTimeInMillis() + 23 * 60 * 60 * 1000; myCurrentCalendar.setTime(new Date()); }