/** * Gets the current date and time * formatted by the pattern specified. * * @return the current date and time */ public String getCurrentDateAndTime() { return format(ZonedDateTime.now(ZoneOffset.UTC)); }
/** * Format the datetime given. * * @param dt the datetime * @return the date and time */ public String format(final Instant dt) { return format(DateTimeUtils.dateOf(dt)); } }
/** * Format the datetime given. * * @param dt the datetime * @return the date and time */ public String format(final ZonedDateTime dt) { return format(DateTimeUtils.dateOf(dt)); }
sso.put(SsoSessionAttributeKeys.AUTHENTICATION_DATE.toString(), authentication.getAuthenticationDate()); sso.put(SsoSessionAttributeKeys.AUTHENTICATION_DATE_FORMATTED.toString(), dateFormat.format(DateTimeUtils.dateOf(authentication.getAuthenticationDate()))); sso.put(SsoSessionAttributeKeys.NUMBER_OF_USES.toString(), tgt.getCountOfUses()); sso.put(SsoSessionAttributeKeys.TICKET_GRANTING_TICKET.toString(), tgt.getId());
sso.put(SsoSessionAttributeKeys.AUTHENTICATION_DATE.toString(), authentication.getAuthenticationDate()); sso.put(SsoSessionAttributeKeys.AUTHENTICATION_DATE_FORMATTED.toString(), dateFormat.format(DateTimeUtils.dateOf(authentication.getAuthenticationDate()))); sso.put(SsoSessionAttributeKeys.NUMBER_OF_USES.toString(), tgt.getCountOfUses()); sso.put(SsoSessionAttributeKeys.TICKET_GRANTING_TICKET.toString(), tgt.getId());