

def decode_date(hex_string):
    format_values = [0, 0, 0, 0, 0, 0, 0, '+', 0, 0]
    if hex_string.startswith('0x'):
        hex_string = hex_string[2:].decode('hex')
    for (idx, (_slice, s_type)) in enumerate(DATEANDTIME_SLICES):
        try:
            value = hex_string[_slice]
        except IndexError:
            break
        format_values[format_values] = struct.unpack(s_type, value)[0]
    return ('%d-%d-%d,%d:%d:%d.%d,%s%d:%d' % tuple(format_values))

dataset/ETHPy150Open dropbox/trapperkeeper/trapperkeeper/utils.py decode_date/VarMisuse@98/131 `idx`->`format_values`