public static String dateToMillis(Date date) {
        return zeroPadString(Long.toString(date.getTime()), 15);
    }
Formats a Date as a fifteen character long String made up of the Date's
padded millisecond value.
@param date the date to encode
@return a Date encoded as a String.
xmppserver/src/main/java/org/jivesoftware/util/StringUtils.java