public class InstantFormatter extends Object implements Formatter<Instant>
Formatter implementation for a JSR-310 Instant,
following JSR-310's parsing rules for an Instant (that is, not using a
configurable DateTimeFormatter): accepting the
default ISO_INSTANT format as well as RFC_1123_DATE_TIME
(which is commonly used for HTTP date header values), as of Spring 4.3.Instant.parse(java.lang.CharSequence),
DateTimeFormatter.ISO_INSTANT,
DateTimeFormatter.RFC_1123_DATE_TIMEpublic Instant parse(String text, Locale locale) throws ParseException
Parserparse 在接口中 Parser<Instant>text - the text stringlocale - the current user localeParseException - when a parse exception occurs in a java.text parsing library