Here you can find the source of getTimeString(long time)
public static final String getTimeString(long time)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import android.annotation.SuppressLint; public class Main { @SuppressLint("SimpleDateFormat") private static final SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); public static final String getTimeString(long time) { return dateFormat.format(new Date(time)); }/*from ww w . ja v a 2 s . c o m*/ }