Here you can find the source of getMainClockString(Date utcDate)
public static String getMainClockString(Date utcDate)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String getMainClockString(Date utcDate) { if (utcDate.getTime() == 0) { return ""; }/*from w w w. j a va 2 s .c om*/ SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.CHINA); return sdf.format(utcDate.getTime()); } }