开发者

Pattern to parsing datetime with daylight savings time using Joda time

开发者 https://www.devze.com 2023-03-20 21:45 出处:网络
How to use joda time to parse a date time value like this \"2011-03-01T01:00:00-07:00\" Does anyone has any code sample 开发者_StackOverflowto parse the above datetime pattern?This is an ISO formatted

How to use joda time to parse a date time value like this "2011-03-01T01:00:00-07:00" Does anyone has any code sample 开发者_StackOverflowto parse the above datetime pattern?


This is an ISO formatted date string. Jodatime supports it as follows:

DateTimeFormatter psr = ISODateTimeFormat.dateTimeParser()

DateTime date = psr.parseDateTime("2011-03-01T01:00:00-07:00")
0

精彩评论

暂无评论...
验证码 换一张
取 消