public function test_parse_leapSecond() { $expected = OffsetDateTime::of(1970, 2, 3, 23, 59, 59, 123456789, ZoneOffset::UTC())->toInstant(); $f = (new DateTimeFormatterBuilder())->appendInstant4(-1)->toFormatter(); foreach (ResolverStyle::values() as $style) { $pared = $f->withResolverStyle($style)->parse("1970-02-03T23:59:60.123456789Z"); $this->assertEquals($pared->query(Instant::fromQuery()), $expected); $this->assertEquals($pared->query(DateTimeFormatter::parsedExcessDays()), Period::ZERO()); $this->assertEquals($pared->query(DateTimeFormatter::parsedLeapSecond()), true); } }