File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 37
37
* @created 2012-10-10
38
38
*/
39
39
public class FieldUtils {
40
+ public static final SimpleDateFormat SDF = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" );
41
+
40
42
public static Method getFieldGetMethod (Class <?> clazz , Field f ) {
41
43
String fn = f .getName ();
42
44
Method m = null ;
@@ -337,11 +339,10 @@ public static boolean isBaseDateType(Field field){
337
339
clazz .isPrimitive ();
338
340
}
339
341
340
- private static SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" );
341
- private static Date stringToDateTime (String strDate ) {
342
+ public static Date stringToDateTime (String strDate ) {
342
343
if (strDate != null ) {
343
344
try {
344
- return sdf .parse (strDate );
345
+ return SDF .parse (strDate );
345
346
} catch (ParseException e ) {
346
347
e .printStackTrace ();
347
348
}
You can’t perform that action at this time.
0 commit comments