Java tutorial
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.TimeZone; public class Main { public static String formatTime(long millisecond) { DateFormat format = new SimpleDateFormat("mm:ss"); format.setTimeZone(TimeZone.getTimeZone("GMT+00:00")); return format.format(millisecond); } }