code: public static String format( JsonSerializerParameters params, Date date ) {
          DateTimeFormat format;
          if ( null == params.getPattern() ) {
              format = DateFormat.DATE_FORMAT_STR_ISO8601;
          } else {
              format = DateTimeFormat.getFormat( params.getPattern() );
          }
  
          TimeZone timeZone;
          if ( null == params.getTimezone() ) {
              timeZone = DateFormat.UTC_TIMEZONE;
          } else {
              timeZone = params.getTimezone();
          }
  
          return format( format, timeZone, date );
      }
docs: Format a date using {@link JsonSerializerParameters} or default values : {@link #DATE_FORMAT_STR_ISO8601} and {@link #UTC_TIMEZONE}
  
  @param date date to format
  @return the formatted date
  @param params a {@link com.github.nmorel.gwtjackson.client.JsonSerializerParameters} object.