@Override
    public Date parse(final String input) throws InvalidDateException {
        try {
            return Date.from(LocalDateTime.parse(input, DateTimeFormatter.ISO_DATE_TIME).toInstant(ZoneOffset.UTC));
        }
        catch(DateTimeParseException e) {
            throw new InvalidDateException(e.getMessage(), e);
        }
    }
@Test
    public void testParseWithoutMilliseconds() throws Exception {
        final ISO8601DateFormatter formatter = new ISO8601DateFormatter();
        assertThrows(InvalidDateException.class, () -> formatter.parse("").getTime());
        assertEquals(1667567722000L, formatter.parse("2022-11-04T13:15:22Z").getTime(), 0L);
    }