Java tutorial
//package com.java2s; // This copy of Ice is licensed to you under the terms described in the import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String formatTimestamp(long timestamp) { DateFormat dtf = new SimpleDateFormat("HH:mm:ss"); dtf.setTimeZone(TimeZone.getDefault()); return dtf.format(new Date(timestamp)); } }