src/main/java/com/teamunify/i18n/I.java
public static Date ISOTimestampToDate(String iso, Date defaultValue) {
    if (iso == null || iso.isEmpty())
      return defaultValue;
    try {
      SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S", Locale.ENGLISH);
      return df.parse(iso);
    } catch (Exception e) {
      log.debug("Unable to parse date: " + iso, e);
    }
    return defaultValue;
  }
/**
   * Convert an ISO timestamp string into a Date object.
   *
   * @param iso          The string, in format: yyyy-MM-dd HH:mm:ss.S
   * @param defaultValue The date to return if parsing fails
   * @return The parsed date, or defaultValue.
   */
Convert an ISO timestamp string into a Date object.
@param iso          The string, in format: yyyy-MM-dd HH:mm:ss.S
@param defaultValue The date to return if parsing fails
@return The parsed date, or defaultValue.
Convert an ISO timestamp string into a Date object . @param iso The string in format : yyyy - MM - dd HH : mm : ss . S @param defaultValue The date to return if parsing fails @return The parsed date or defaultValue .
public static Date ISOTimestampToDate(String iso, Date defaultValue) {
    if (iso == null || iso.isEmpty())
      return defaultValue;
    try {
      SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S", Locale.ENGLISH);
      return df.parse(iso);
    } catch (Exception e) {
      log.debug("Unable to parse date: " + iso, e);
    }
    return defaultValue;
  }
public static Date ISOTimestampToDate ( String iso , Date defaultValue ) { if ( iso == null || iso . isEmpty ( ) ) return defaultValue ; try { SimpleDateFormat df = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.S" , Locale . ENGLISH ) ; return df . parse ( iso ) ; } catch ( Exception e ) { log . debug ( "Unable to parse date: " + iso , e ) ; } return defaultValue ; }
Convert an ISO timestamp string into a Date object.
Convert an ISO timestamp string into a Date object .