'Creates an at command based on the time and command parameter.
This is the format i\'m expecting for the time parameter:
The current time is: 11:24:19.59
Enter the new time:
:return: A tuple with the "at" command, and the time that it will take
to run the command.'

def _create_at_command(self, time, command):

    res = 'at    '
    try:
        time = time.split('\n')[0].split(':')[1:]
        hour = time[0]
        minute = time[1]
        if ('.' in time[2]):
            seconds = time[2].split('.')[0]
        else:
            seconds = time[2].split(',')[0]
        if (int(hour) > 12):
            am_pm = ''
        else:
            am_pm = ''
    except:
        raise BaseFrameworkException('The    time    command    of    the    remote    server    returned    an    unknown    format.')
    else:
        if (int(seconds) > 57):
            delta = 2
            wait_time = (60 + 5)
        else:
            delta = 1
            wait_time = (60 - int(seconds))
        minute = (int(minute) + delta)
        (hour, minute, am_pm) = self._fix_time(hour, minute, am_pm)
        res += (((((str(hour) + ':') + str(minute).zfill(2)) + am_pm) + '    ') + command)
    return (res, wait_time)
