/**
* 时间戳转日期对象并以字符串返回
*/
public String getTime(int time){
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String time = LocalDateTime.ofEpochSecond(time, 0, ZoneOffset.ofHours(8)).format(df);
return time;
}
/**
* 时间戳转日期对象并以字符串返回
*/
public String getTime(int time){
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String time = LocalDateTime.ofEpochSecond(time, 0, ZoneOffset.ofHours(8)).format(df);
return time;
}