Convert to CST Using Joda API

后端 未结 3 1998
日久生厌
日久生厌 2021-01-21 07:57

Any one know how to convert UTC time to CST time using joda date time api ? My code is something like this.

DateTimeZone          


        
3条回答
  •  一向
    一向 (楼主)
    2021-01-21 08:09

    Some of the three-letter time zones (EST and MST, for example) are included in the default time zone database used by Joda. Others (CST and PST, for example) are not. (See http://joda-time.sourceforge.net/timezones.html for more details.)

    The time zone IDs supported by Joda can be obtained by calling org.joda.time.DateTimeZone.getAvailableIDs(), and that set does differ from those returned by java.util.TimeZone.getAvailableIDs().

提交回复
热议问题