Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static int getHour() { return Calendar.getInstance().get(Calendar.HOUR_OF_DAY); } }