public static String dateToString(Date date){
  if (date == null) {
    return null;
  }
 else {
    DateFormat df=new SimpleDateFormat(dateFormat);
    df.setTimeZone(utc);
    return df.format(date);
  }
}

public static String dateToString ( Date date ) { if ( date == null ) { return null ; } else { DateFormat df = new SimpleDateFormat ( dateFormat ) ; df . setTimeZone ( utc ) ; return df . format ( date ) ; } }
converts a date object to a string representation .
