<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _swclock_to_hwclock():
    '''
    Set hardware clock to value of software clock.
    '''
    res = __salt__['cmd.run_all'](['hwclock', '--systohc'], python_shell=False)
    if res['retcode'] != 0:
        msg = 'hwclock failed to set hardware clock from software clock: {0}'.format(res['stderr'])
        raise CommandExecutionError(msg)
    return True