BUGFIX:取消like后不能再like同一张图片

其他:generate--sketchboard 添加gender
修改generate like的图片命名--当下的十位时间戳
This commit is contained in:
xupei
2023-11-15 13:22:15 +08:00
parent 93577cab8e
commit 35e6bb8cd9
4 changed files with 24 additions and 2 deletions

View File

@@ -68,4 +68,17 @@ public class DateUtil {
return date;
}
/**
* 获取指定时区的时间戳的前十位
* @param timeZone 时区
* @return 当前时间戳的前十位
*/
public static String getTimeStamp(String timeZone){
ZoneId zoneId = ZoneId.of(timeZone);
long epochSecond = Instant.now().atZone(zoneId).toEpochSecond();
return String.valueOf(epochSecond).substring(0, 10);
}
}