Is this bad?

Is it bad to have like a six hour eating window and not eat anything past 2pm? (9am-2pm) it's my own version of intermittent fasting which helped me lose weight in the past because eating at night makes me gain since I'm not active later in the day?