public static String formatTimeStamp(long timeStamp){
  SimpleDateFormat formatter=new SimpleDateFormat("hh:mm a");
  Calendar calendar=Calendar.getInstance();
  calendar.setTimeInMillis(timeStamp);
  return formatter.format(calendar.getTime());
}

public static String formatTimeStamp ( long timeStamp ) { SimpleDateFormat formatter = new SimpleDateFormat ( "hh:mm a" ) ; Calendar calendar = Calendar . getInstance ( ) ; calendar . setTimeInMillis ( timeStamp ) ; return formatter . format ( calendar . getTime ( ) ) ; }
format the long system . currenttimemillis ( ) to a better looking timestamp . uses a calendar object to format with the user ' s current time zone .
