public function testToString() { $this->assertSame('America/Los_Angeles', (string) TimeZoneRegion::of('America/Los_Angeles')); }
/** * @param DateTimeParseResult $result * * @return TimeZoneRegion * * @throws DateTimeException If the region is not valid. * @throws DateTimeParseException If required fields are missing from the result. */ public static function from(DateTimeParseResult $result) { $region = $result->getField(Field\TimeZoneRegion::NAME); return TimeZoneRegion::of($region); }