Java Time Zone When Parsing DateFormat

后端 未结 7 1668
梦谈多话
梦谈多话 2020-12-06 17:20

I had code that parses date as follows:

String ALT_DATE_TIME_FORMAT = \"yyyy-MM-dd\'T\'HH:mm:ss.SSSZ\";
SimpleDateFormat sdf = new SimpleDateFormat(
                 


        
7条回答
  •  -上瘾入骨i
    2020-12-06 17:53

    If you want to parse it using straight JDK, i believe it should be parseable using the JAXB utils, see DatatypeFactory.newXMLGregorianCalendar or DatatypeConverter.parseDateTime.

提交回复
热议问题