This is a myth that you can scribble off your myths list. The time of day has no bearing on fat storage and weight gain. The fact is weight gain is a function of total calories consumed v/s a person’s energy expenditure and metabolic rate. Your digestive system religiously does it’s job whenever you ask it to.
The notion of having a fixed cut off time was to program people to stop eating 3 hours prior to hitting the bed, keeping digestion and personal comfort in mind. As the day winds down your metabolism does slow down and a full stomach means asking your digestive system to overwork while it’s trying to shut down. This doesn’t lead to weight gain but going to sleep on a full stomach leads to fitful sleep, gas and indigestion as your digestive functions are working and not at rest.
Also late night eating (binging) normally isn’t fueled by hunger but driven by habit, boredom, tiredness, or stress. Calorie-dense food is far more appealing than preparing and consuming a well-balanced, healthier meal when you’re tired and just want to relax in front of the TV or with friends/family. So you end up with chips, cookies, chocolate, pizza, and ice cream on your plate most days. A fixed time deters many from eating too much of “junk food” at one go. The later you eat, lower the chances that you wake with real hunger and appetite, making you skip breakfast which helps control calorie intake throughout the day.
So finally, your total caloric intake for the day is what matters–not the time at which you eat your calories. Eating late at night won’t make you fat but eat mindfully to satisfy real hunger rather than stress or boredom. In any case avoid overeating as your body will store the extra calories as fat, no matter what time you consume them.