public static String getLocalTime(Date date, TimeZone timeZone) {
		if (date == null) {
			return CommonUtils.NOT_AVAILABLE;
		}

		Assert.notNull(timeZone, "The provided timeZone must not be null.");

		final DateFormat dateFormat = TimeUtils.getDefaultDateTimeFormat();
		dateFormat.setTimeZone(timeZone);
		return dateFormat.format(date);
	}
Return a date/time formatted String for the provided {@link Date} and {@link TimeZone}.
Uses the {@link DateFormat} provided by {@link TimeUtils#getDefaultDateTimeFormat()}

If the date is {@code null} {@link CommonUtils#NOT_AVAILABLE} is returned.

@param date Can be null
@param timeZone Must not be null
@return Formatted date/time
spring-xd-shell/src/main/java/org/springframework/xd/shell/util/CommonUtils.java