import time


def getTimeStr(seconds):
    """Get HH:MM:SS time string for seconds.
    """
    if seconds < 86400:
        return time.strftime('%H:%M:%S', time.gmtime(seconds))
    else:
        return time.strftime('{}d%H:%M:%S'.format(int(seconds) // 86400), time.gmtime(int(seconds)))