code: public static String formatDate(Long timestamp, String format, Locale loc) {
  		if (StringUtils.isBlank(format)) {
  			format = DateFormatUtils.ISO_8601_EXTENDED_DATE_FORMAT.getPattern();
  		}
  		if (timestamp == null) {
  			timestamp = timestamp();
  		}
  		if (loc == null) {
  			loc = Locale.US;
  		}
  		return DateFormatUtils.format(timestamp, format, loc);
  	}
docs: Formats a date in a specific format.
  @param timestamp the Java timestamp
  @param format the date format
  @param loc the locale instance
  @return a formatted date