Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; public class Main { public static String getCurrentTime() { Calendar currentTime = Calendar.getInstance(); SimpleDateFormat dateformat = new SimpleDateFormat("HH:mm", Locale.CHINA); String timeLableStr = dateformat.format(currentTime.getTime()); return timeLableStr; } }