def time2levels(tstamp):
    """Given a :class:`datetime.datetime` object,
    return a list of directory levels (as strings).

    For example, given "2013-09-08 13:01:44",
    return ['2013', '09', '08', '13', '01']
    """
    return [tstamp.strftime(xx) for xx in ('%Y', '%m', '%d', '%H', '%M')]