Преглед изворни кода

修改时间工具类格式化时间

肖玮 пре 5 година
родитељ
комит
75f991f416
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java

+ 1 - 2
mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java

@@ -23,8 +23,7 @@ public class DateUtil {
     private static ThreadLocal<DateFormat> threadLocal = new ThreadLocal<DateFormat>();
 
     public static DateFormat getDateFormat(String dateFormat) {
-        DateFormat df = threadLocal.get();
-        df = new SimpleDateFormat(dateFormat);
+        DateFormat df = new SimpleDateFormat(dateFormat);
         threadLocal.set(df);
         return df;
     }