需要输出的json格式中的时间是格式化好的。 Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm") .create(); gson.toJson(Str);