public function test_isoOffsetTime_basics() { $this->assertEquals(DateTimeFormatter::ISO_OFFSET_TIME()->getChronology(), null); $this->assertEquals(DateTimeFormatter::ISO_OFFSET_TIME()->getZone(), null); $this->assertEquals(DateTimeFormatter::ISO_OFFSET_TIME()->getResolverStyle(), ResolverStyle::STRICT()); }
/** * Obtains an instance of {@code OffsetTime} from a text string such as {@code 10:15:30+01:00}. * <p> * The string must represent a valid time and is parsed using * {@link java.time.format.DateTimeFormatter#ISO_OFFSET_TIME}. * * @param string $text the text to parse such as "10:15:30+01:00", not null * @return OffsetTime the parsed local time, not null * @throws DateTimeParseException if the text cannot be parsed */ public static function parse($text) { return self::parseWith($text, DateTimeFormatter::ISO_OFFSET_TIME()); }