static public String formatDate(Date d){
  if (timeFormatter == null) {
    try {
      return Long.toString(d.getTime());
    }
 catch (    Exception ignore) {
      return "timestampFormatFailed";
    }
  }
  try {
synchronized (timeFormatter) {
      return timeFormatter.format(d);
    }
  }
 catch (  Exception e1) {
    try {
      return d.toString();
    }
 catch (    Exception e2) {
      try {
        return Long.toString(d.getTime());
      }
 catch (      Exception e3) {
        return "timestampFormatFailed";
      }
    }
  }
}

static public String formatDate ( Date d ) { if ( timeFormatter == null ) { try { return Long . toString ( d . getTime ( ) ) ; } catch ( Exception ignore ) { return "timestampFormatFailed" ; } } try { synchronized ( timeFormatter ) { return timeFormatter . format ( d ) ; } } catch ( Exception e1 ) { try { return d . toString ( ) ; } catch ( Exception e2 ) { try { return Long . toString ( d . getTime ( ) ) ; } catch ( Exception e3 ) { return "timestampFormatFailed" ; } } } }
convert a date to a timestamp string .
