| | |
| | | |
| | | private static DateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); |
| | | |
| | | public static final String LAST_TIME = "2038-01-01 00:00:00"; |
| | | public static final String LAST_TIME = "2050-01-01 00:00:00"; |
| | | |
| | | private static Map<String, SimpleDateFormat> formats = new HashMap(); |
| | | public static final String DATE_FORMATE_STRING_DEFAULT = "yyyyMMddHHmmss"; |
| | |
| | | calendar.add(Calendar.SECOND, 1); |
| | | return getFormatTimeStringA(calendar.getTime()); |
| | | } |
| | | |
| | | public static String getPreSecTime(String time) { |
| | | Date tTime = getDateFromStringA(time); |
| | | return getPreSecTime(tTime); |
| | | } |
| | | |
| | | public static String getPreSecTime(Date time) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(time); |
| | | calendar.add(Calendar.SECOND, -1); |
| | | return getFormatTimeStringA(calendar.getTime()); |
| | | } |
| | | } |