解决linux时间转换为yyyy-MM-dd
linux时间显示为:Tue Nov 30 09:33:04 CST 2021 SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); String newStartDate = ""; try { newStartDate = DateUtil.format(sdf.parse(startDate + " CST "+year),"yyyy-MM-dd HH:mm"); } catch (ParseException e) { e.printStackTrace(); log.error("时间转换错误",e); }