alibaba/easyexcel

使用easyexcel的 @DateTimeFormat("yyyy-MM-dd HH:mm:ss")注解导出数据秒多一秒

Open

#3.419 geöffnet am 20. Aug. 2023

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (7.599 Forks)batch import
help wanted

Repository-Metriken

Stars
 (33.728 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

数据库中的数据是时间戳类型的

image 实体类的时间类型是java.time.Instant转为Date类型带有毫秒,使用@DateTimeFormat( "yyyy-MM-dd HH:mm:ss")导出的excel文件中秒会出现+1的情况

目前是使用自定义的Converter来避免Date时间有毫秒时,excel文件出现+1秒的情况,是这个@DateTimeFormat注解的使用有问题吗?

Contributor Guide