Set whether network time is on or off.

    :param enable: True to enable, False to disable. Can also use 'on' or 'off'
    :type: str bool

    :return: True if successful, False if not
    :rtype: bool

    :raises: CommandExecutionError on failure

    CLI Example:

    .. code-block:: bash

        salt '*' timezone.set_using_network_time True

def set_using_network_time(enable):
    '''
    Set whether network time is on or off.

    :param enable: True to enable, False to disable. Can also use 'on' or 'off'
    :type: str bool

    :return: True if successful, False if not
    :rtype: bool

    :raises: CommandExecutionError on failure

    CLI Example:

    .. code-block:: bash

        salt '*' timezone.set_using_network_time True
    '''
    state = salt.utils.mac_utils.validate_enabled(enable)

    cmd = 'systemsetup -setusingnetworktime {0}'.format(state)
    salt.utils.mac_utils.execute_return_success(cmd)

    return state == salt.utils.mac_utils.validate_enabled(
        get_using_network_time())