def get_time_diff(t1, t2):
    """
    Translate difference in seconds to days or hours or minutes or seconds
    """
    seconds = t2 - t1
    days = int(seconds / 86400)
    if days:
        return '%sd' % (days)

    seconds -= days * 86400
    hours = int(seconds / 3600)
    seconds -= hours * 3600
    minutes = int(seconds / 60)
    if hours:
        return '%sh %smin' % (hours, minutes)

    if minutes:
        return '%smin' % (minutes)

    seconds -= minutes * 60
    return '%ss' % (seconds)