Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static long getTimeLongTenHours(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month, day); calendar.set(Calendar.HOUR_OF_DAY, 10); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); } }