How can I get my date formatted as 2012-11-25T23:50:56.193+01:00 using SimpleDateFormat? If I use Z in the format like
2012-11-25T23:50:56.193+01:00
SimpleDateFormat
Z
yyyy-MM-dd'T'hh:mm:ss.SSSZ
then it shows
2013-03-06T11:49:05.490+0100
You can get the timezone offset formatted like +01:00 with the SimpleDateFormat in Java 7 (yyyy-MM-dd'T'HH:mm:ss.SSSXXX), or with the Joda's DateTimeFormat (yyyy-MM-dd'T'HH:mm:ss.SSSZZ).
+01:00
yyyy-MM-dd'T'HH:mm:ss.SSSXXX
yyyy-MM-dd'T'HH:mm:ss.SSSZZ
1.4m articles
1.4m replys
5 comments
56.9k users