alibaba/easyexcel

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

Open

#3,419 opened on Aug 20, 2023

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Java (7,599 forks)batch import
help wanted

Repository metrics

Stars
 (33,728 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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

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

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

Contributor guide