Using the joda-time-2.0 version library, I was wondering, which of this functions is better to construct from an ISO date (suposed XML xs:dateTime
format): new DateTime(String)
versus DateTime.parse(String)
.
Because both return a different result from same value. Example:
new DateTime("2012-08-16T07:22:05Z")
DateTime.parse("2012-08-16T07:22:05Z")
Resulting different because of the ISOChronology. First says is ISOChronology[Europe/Paris]
and second ISOChronology[UTC]
, although milliseconds are the same.
Also, here recomends to use ISODateTimeFormat.dateTimeNoMillis()
, giving the same result as using the first version (new
).