def set_time(time):
 time_format = _get_date_time_format(time)
 dt_obj = datetime.strptime(time, time_format)
 cmd = 'systemsetup -settime {0}'.format(dt_obj.strftime('%H:%M:%S'))
 return salt.utils.mac_utils.execute_return_success(cmd)

def set_time ( time ) : time_format = _get_date_time_format ( time ) dt_obj = datetime . strptime ( time , time_format ) cmd = 'systemsetup -settime {0}' . format ( dt_obj . strftime ( '%H:%M:%S' ) ) return salt . utils . mac_utils . execute_return_success ( cmd )
sets the current time .