private static function _createTimeZone(string $tz): \DateTimeZone
    {
        try {
            return new \DateTimeZone($tz);
        } catch (\Exception $e) {
            throw new \UnexpectedValueException("Invalid timezone.", 0, $e);
        }
    }
private static function _createTimeZone(string $tz): \DateTimeZone
    {
        try {
            return new \DateTimeZone($tz);
        } catch (\Exception $e) {
            throw new \UnexpectedValueException("Invalid timezone.", 0, $e);
        }
    }
private static function _createTimeZone ( string $ tz ) : \ DateTimeZone { try { return new \ DateTimeZone ( $ tz ) ; } catch ( \ Exception $ e ) { throw new \ UnexpectedValueException ( "Invalid timezone." , 0 , $ e ) ; } }
Create DateTimeZone object from string.

@param string $tz
@throws \UnexpectedValueException
@return \DateTimeZone
Create DateTimeZone object from string .