public function toISOZonal(string $precision = '') : string
    {
        switch ($precision) {
            case '':
                $minor = '';
                break;
            case 'milliseconds':
                $minor = '.' . $this->format('v');
                break;
            case 'microseconds':
                $minor = '.' . $this->format('u');
                break;
            default:
                throw new \InvalidArgumentException(
                    'Arg precision[' . $precision . '] isn\'t empty or value milliseconds|microseconds.'
                );
        }
        if (!$precision) {
            return $this->format('c');
        }
        $str = $this->format('c');
        return substr($str, 0, -6) . $minor . substr($str, -6);
    }
public function toISOZonal(string $precision = '') : string
    {
        switch ($precision) {
            case '':
                $minor = '';
                break;
            case 'milliseconds':
                $minor = '.' . $this->format('v');
                break;
            case 'microseconds':
                $minor = '.' . $this->format('u');
                break;
            default:
                throw new \InvalidArgumentException(
                    'Arg precision[' . $precision . '] isn\'t empty or value milliseconds|microseconds.'
                );
        }
        if (!$precision) {
            return $this->format('c');
        }
        $str = $this->format('c');
        return substr($str, 0, -6) . $minor . substr($str, -6);
    }
public function toISOZonal ( string $ precision = '' ) : string { switch ( $ precision ) { case '' : $ minor = '' ; break ; case 'milliseconds' : $ minor = '.' . $ this -> format ( 'v' ) ; break ; case 'microseconds' : $ minor = '.' . $ this -> format ( 'u' ) ; break ; default : throw new \ InvalidArgumentException ( 'Arg precision[' . $ precision . '] isn\'t empty or value milliseconds|microseconds.' ) ; } if ( ! $ precision ) { return $ this -> format ( 'c' ) ; } $ str = $ this -> format ( 'c' ) ; return substr ( $ str , 0 , - 6 ) . $ minor . substr ( $ str , - 6 ) ; }
To ISO-8601 with timezone marker, optionally with milli- or microseconds
precision.

Formats:
YYYY-MM-DDTHH:ii:ss+HH:II
YYYY-MM-DDTHH:ii:ss.mmm+HH:II
YYYY-MM-DDTHH:ii:ss.mmmmmm+HH:II

Same as:
@see Time::__toString().

@param string $precision
Values: (empty)|milliseconds|microseconds.
Default: empty; with neither milli- nor microseconds.

@return string

@throws \InvalidArgumentException
Arg precision not empty or milliseconds|microseconds.
To ISO - 8601 with timezone marker optionally with milli - or microseconds precision .