更改 pojo-> Bot 的时区设置

This commit is contained in:
flykhan 2023-02-23 16:53:42 +08:00
parent 6a1aace1c0
commit 3de67ee47c
1 changed files with 6 additions and 5 deletions

View File

@ -25,10 +25,11 @@ public class Bot {
private String content;
private Integer rating;
// pojo中定义日期格式的注解@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// timezone 用于修改时区
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date createtime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date modifytime;
}