Java SimpleDateFormat for YYYY-MM-DDThh:mm:ssTZD [duplicate]
问题 This question already has answers here : Java SimpleDateFormat pattern for W3C XML dates with timezone [duplicate] (9 answers) Closed 6 years ago . One of the external APIs we use requires "YYYY-MM-DDThh:mm:ssTZD" format to be passed in XMLGregorianCalendar object. I am not sure if there is anything in Java that supports "T" . I was wondering, if a date can be parsed into above format in Java? An example of a valid date they have provided is "2009-07-16T19:20:30-05:00" ............ Update: