I am trying to import a given string representing a Date in the format:
2007-03-12T00:00:00.000+01:00
Now to create a new Date Object i use Joda Library using:
DateTime date = new DateTime(year, month, day, hour, minute, second);
However, i want to make sure two things here:
- How to handle GTM +1 in this date time context?
- Is there anyway,
that i don’t have to parse this string, and the Date Object can be
initialized directly with this string?
As has been mentioned in other answers, the offset is supposed to be parsed along with the rest of the string according to the documentation.