Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Locale; public class Main { public static String formatTime(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.CHINA); String sDateTime = sdf.format(lefttime); return sDateTime; } }