public function test_now_Clock() { $instant = OffsetDateTime::ofDateAndTime(LocalDate::of(2010, 12, 31), LocalTime::of(0, 0), ZoneOffset::UTC())->toInstant(); $clock = Clock::fixed($instant, ZoneOffset::UTC()); $test = Year::nowof($clock); $this->assertEquals($test->getValue(), 2010); }