在Java中,你真的会日期转换吗https://juejin.im/entry/5b4f45a25188251af256f891
用LocalDateTime
一个秒的数字转成hhmmss
private static String secondNum2Time(long time) {
long hour = time / 3600;
long minute = time / 60 % 60;
long second = time % 60;
return hour +":"+minute+":"+second;
}
网友评论