且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将joda.time.DateTime转换为java.sql.Date并保留时区

更新时间:2023-02-18 23:07:05

java的内部表示.sql.Date 是1970年1月1日00:00 00:00之后的毫秒数。

The internal representation of a java.sql.Date is the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

您确定您没有看到 toString 问题吗?尽管折旧的方法 toGMTString()仍然存在。

Are you sure that you're not looking at a toString problem? The method toGMTString(), although depreciated, still exists.