Given a :class:`datetime.datetime` object,
    return a path assembled with :func:`os.path.join`
    for the levels.

def time2dir(tstamp):
    """Given a :class:`datetime.datetime` object,
    return a path assembled with :func:`os.path.join`
    for the levels."""
    result = ''
    for field in time2levels(tstamp):
        result = join(result, field)
    return result