Here you can find the source of formatTime(long time)
public static String formatTime(long time)
//package com.java2s; import android.text.format.Time; public class Main { public static String formatTime(long time) { Time t = new Time(); t.set(time);/*from ww w . jav a 2s. c o m*/ return t.format("%d.%m.%Y %H:%M:%S"); } }