解决方法
javax.sql.Date
:
A thin wrapper around a millisecond value that allows JDBC to identify
this as an sql DATE value. A milliseconds value represents the number
of milliseconds that have passed sinceJanuary 1,1970 00:00:00.000 GMT
.To conform with the deFinition of sql DATE,the millisecond values
wrapped by ajava.sql.Date
instance must be ‘normalized’ by setting
the hours,minutes,seconds,and milliseconds to zero in the
particular time zone with which the instance is associated.
或从JodaTime:DateMidnight
或LocalDate
(谢谢
@cdeszaq)
DateMidnight
defines a date where the time component is fixed at
midnight. The class uses a time zone,thus midnight is local unless a
UTC time zone is used.It is important to emphasise that this class represents the time of midnight on any given day. Note that midnight is defined as 00:00,which is at the very start of a day.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。