def set_period(shot, season):
    """
    Sets period of a shot in accordance of its actual time.
    """
    # in season 2016/17 shot times are mainly set to full period times with
    # 0 meaning first period, 1200 second period etc.
    if season == 2016:
        shot['period'] = shot['time'] // 1200 + 1
    else:
        if shot['time'] % 20 != 0:
            shot['period'] = shot['time'] // 1200 + 1
        else:
            shot['period'] = shot['time'] // 1200
    if shot['period'] == 0:
        shot['period'] = 1
    elif shot['period'] > 3:
        shot['period'] = 'OT'

    return shot