public String format(Date date) {
        Calendar c = new GregorianCalendar(cDefaultTimeZone);
        c.setTime(date);
        if (mTimeZone != null) {
            c.setTimeZone(mTimeZone);
        }
        return applyRules(c, new StringBuffer(mMaxLengthEstimate)).toString();
    }
@param pattern {@link java.text.SimpleDateFormat} compatible pattern
@param timeZone optional time zone, overrides time zone of formatted
date
@param locale optional locale, overrides system locale
@param symbols optional date format symbols, overrides symbols for
provided locale
xmppserver/src/main/java/org/jivesoftware/util/FastDateFormat.java