In joda time how to convert time zone without changing time

后端 未结 7 1993
一生所求
一生所求 2020-12-04 19:06

I am getting UTC timestamp from database which is I am setting into a JodaTime DateTime instance

DateTime dt = new DateTime(timestamp.getTime())         


        
7条回答
  •  再見小時候
    2020-12-04 19:24

    You can use the withZoneRetainFields() method of DateTime to alter the timezone without altering the numerals in the date.

提交回复
热议问题