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 __HOLE__:
            break
        format_values[idx] = 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