SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");SimpleDateFormat output = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");Date d = sdf.parse(time);String formattedTime = output.format(d);这有效。您必须使用两种SimpleDateFormat,一种用于输入,一种用于输出,但是它将为您提供所需的东西。



