Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { /** * Returns the current hour of the day as set on the device. * @return */ public static int getMinuteOfDay() { SimpleDateFormat format = new SimpleDateFormat("m"); format.setTimeZone(TimeZone.getTimeZone("UTC")); return Byte.parseByte(format.format(new Date())); } }