Here you can find the source of convertTimeStumpToDate(String time)
public static String convertTimeStumpToDate(String time)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private final static SimpleDateFormat dateFormater = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss", Locale.CHINA); public static String convertTimeStumpToDate(String time) { try {//from w ww . j a va 2s. c o m return dateFormater.format(new Date(toLong(time) * 1000L)); } catch (Exception e) { return null; } } public static long toLong(String obj) { try { return Long.parseLong(obj); } catch (Exception e) { } return 0; } }