String aa="1422865572";
long nowTime=System.currentTimeMillis(); //当前时间戳
//以下为时间戳转化
long retime =Integer.valueOf(aa).intValue();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String date = sdf.format(new Date(retime*1000));
System.out.print(date);
时间: 2024-10-14 18:49:56