Convert joda.time.DateTime to java.sql.Date and retain time zone

前端 未结 3 1677
故里飘歌
故里飘歌 2021-02-09 17:01

I have the following scenario:

  • Swing control that returns a Calendar object
  • Intermediate DateTime object that I use to do heavy
3条回答
  •  执笔经年
    2021-02-09 17:59

    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.

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

提交回复
热议问题