fix
parent
31a56a778a
commit
5a55ad0030
|
@ -1148,4 +1148,14 @@ public class TimeUtils {
|
|||
return simpleDateFormat.parse(date).getTime();
|
||||
}
|
||||
|
||||
public static long stringToTimeLong(String dateStr,String pattern) {
|
||||
try {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
|
||||
return dateFormat.parse(dateStr).getTime();
|
||||
} catch (ParseException e) {
|
||||
LOGGER.error("", e);
|
||||
}
|
||||
return now();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue