def time_prettyfy(secs):
    """Returns a human readable time description"""

    days = secs // 86400
    hours = (secs % 86400) // 3600
    minutes = (secs % 3600) // 60
    seconds = secs % 60
    message = '%d seconds ago' % seconds
    if minutes:
        message = '%d minutes and %s' % (minutes, message)
    if hours:
        message = '%d hours, %s' % (hours, message)
    if days:
        message = '%d days, %s' % (days, message)
    return message