public String format(final LocalDateTime dateTime, final String pattern) {
        return dateTime.format(DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH));
    }
Format.

@param dateTime the date time
@param pattern  the pattern
@return the string
support/cas-server-support-thymeleaf-core/src/main/java/org/apereo/cas/services/web/CasThymeleafTemplatesDirector.java