def METHOD_NAME(time):
    # 0=Sommer, 1=Winter, 2=Übergang
    month = datetime.fromtimestamp(time).month
    day = datetime.fromtimestamp(time).month
    if ((month == 5) and (day >= 15)) or (month == 6) or (month == 7) or (month == 8) or ((month == 9) and (day < 15)):
        season = 0
    elif (month == 11) or (month == 12) or (month == 1) or (month == 2) or ((month == 3) and (day < 21)):
        season = 1
    elif ((month == 3) and (day >= 21)) or (month == 4) or ((month == 5) and (day < 15)):
        season = 2
    elif ((month == 9) and (day >= 15)) or (month == 10):
        season = 2
    else:
        raise ValueError
    return season