@FromString
    public static UtcInstant parse(CharSequence text) {
        TemporalAccessor parsed = DateTimeFormatter.ISO_INSTANT.parse(text);
        long epochSecond = parsed.getLong(INSTANT_SECONDS);
        long nanoOfSecond = parsed.getLong(NANO_OF_SECOND);
        boolean leap = parsed.query(DateTimeFormatter.parsedLeapSecond());
        long epochDay = Math.floorDiv(epochSecond, SECS_PER_DAY);
        long mjd = epochDay + OFFSET_MJD_EPOCH;
        long nanoOfDay = Math.floorMod(epochSecond, SECS_PER_DAY) * NANOS_PER_SECOND + nanoOfSecond;
        if (leap) {
            nanoOfDay += NANOS_PER_SECOND;
        }
        return UtcInstant.ofModifiedJulianDay(mjd, nanoOfDay);
    }
@ FromString public static UtcInstant parse ( CharSequence text ) { TemporalAccessor parsed = DateTimeFormatter . ISO_INSTANT . parse ( text ) ; long epochSecond = parsed . getLong ( INSTANT_SECONDS ) ; long nanoOfSecond = parsed . getLong ( NANO_OF_SECOND ) ; boolean leap = parsed . query ( DateTimeFormatter . parsedLeapSecond ( ) ) ; long epochDay = Math . floorDiv ( epochSecond , SECS_PER_DAY ) ; long mjd = epochDay + OFFSET_MJD_EPOCH ; long nanoOfDay = Math . floorMod ( epochSecond , SECS_PER_DAY ) * NANOS_PER_SECOND + nanoOfSecond ; if ( leap ) { nanoOfDay += NANOS_PER_SECOND ; } return UtcInstant . ofModifiedJulianDay ( mjd , nanoOfDay ) ; }
Obtains an instance of {@code UtcInstant} from a text string
{@code 2007-12-03T10:15:30.00Z}.
<p>
The string must represent a valid instant in UTC and is parsed using
{@link DateTimeFormatter#ISO_INSTANT} with leap seconds handled.

@param text  the text to parse such as "12345.123456789s(TAI)", not null
@return the parsed instant, not null
@throws DateTimeParseException if the text cannot be parsed
@throws DateTimeException if parsed text represents an invalid leap second