开发者

Pattern to parsing datetime with daylight savings time using Joda time

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜