k.e.book.common.utils.TimeFormatter Maven / Gradle / Ivy
package k.e.book.common.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
public class TimeFormatter {
public static Date getUpdateAt(){
return new Date();
}
public static Date getCreateAt(){
return new Date();
}
public static long phpTimestamp(){
return System.currentTimeMillis()/1000;
}
public static String format(Date date) {
SimpleDateFormat dd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return dd.format(date);
}
}