Android examples for java.util:Timezone
Create java.util.TimeZone via string in GMT+00:00 format
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); }/*from w w w .jav a 2 s . com*/ }