Here you can find the source of convertTimeToString(final long timeInMillis)
public static String convertTimeToString(final long timeInMillis)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; public class Main { private static final String TIME_FORMAT_PATTERN = "HH:mm:ss"; /**/*from w ww. j ava2s.c om*/ * @return zeit als String in der Form HH:mm:ss */ public static String convertTimeToString(final long timeInMillis) { final Calendar calendar = Calendar.getInstance(Locale.GERMAN); calendar.setTimeInMillis(timeInMillis); final SimpleDateFormat format = new SimpleDateFormat(TIME_FORMAT_PATTERN); format.setTimeZone(TimeZone.getTimeZone("GMT+0")); //$NON-NLS-1$ return format.format(calendar.getTime()); } }