1
zhanghua
2024-09-26 c775c6953d9759e70f08acbfa8f6d7490aaae3d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.netsdk.demo.util;
 
import java.text.SimpleDateFormat;
import java.util.Date;
 
/**
 * @description:
 * @author: 251589
 * @time: 2020/11/17 16:34
 */
public class TimeUtils {
 
    public static String getTimeStr(long timestamp) {
        String format = "yyyy-MM-dd HH:mm:ss";
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(new Date(timestamp));
    }
 
    private TimeUtils() {
    }
}