src/TimeZoneOffset.php
public static function parse(string $text, DateTimeParser $parser = null) : TimeZone
    {
        if (! $parser) {
            $parser = IsoParsers::timeZoneOffset();
        }

        return TimeZoneOffset::from($parser->parse($text));
    }
public static function parse(string $text, DateTimeParser $parser = null) : TimeZone
    {
        if (! $parser) {
            $parser = IsoParsers::timeZoneOffset();
        }

        return TimeZoneOffset::from($parser->parse($text));
    }
public static function parse ( string $ text , DateTimeParser $ parser = null ) : TimeZone { if ( ! $ parser ) { $ parser = IsoParsers :: timeZoneOffset ( ) ; } return TimeZoneOffset :: from ( $ parser -> parse ( $ text ) ) ; }
Parses a time-zone offset.

The following ISO 8601 formats are accepted:

* `Z` - for UTC
* `±hh:mm`
* `±hh:mm:ss`

Note that ± means either the plus or minus symbol.

@param string              $text
@param DateTimeParser|null $parser

@return TimeZone

@throws DateTimeParseException
Parses a time - zone offset .