Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static long getTimeMillisAt(int hour, int minute) { Calendar today = Calendar.getInstance(); today.set(Calendar.HOUR_OF_DAY, hour); today.set(Calendar.MINUTE, minute); return today.getTimeInMillis(); } }