public static String UTCStringtODefaultString(String UTCString) {
    try
    {
        if (CommonUtils.notNullAndEmpty(UTCString)) {
            UTCString = UTCString.replace("Z", " UTC");
            SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
            SimpleDateFormat defaultFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = utcFormat.parse(UTCString);
            return defaultFormat.format(date);
        }else{
            return null;
        }

    } catch(ParseException pe)
    {
        pe.printStackTrace();
        return null;
    }
}

  

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案