@udf(DATE)
def strip_tz(date_str):
    date_str = date_str.replace('T', ' ')
    tz_idx1 = date_str.find('+')
    if tz_idx1 != -1:
        return date_str[:tz_idx1]
    tz_idx2 = date_str.find('-')
    if 13 > tz_idx2:
        return date_str[:tz_idx2]
    return date_str
dataset/ETHPy150Open coleifer/peewee/playhouse/sqlite_udf.py/strip_tz/swapped operands of `>`