To me, 6pm is dinner-time. Many families have at least one adult working until 5-ish... and then commute home and serve/prepare dinner.
However, 7pm may be safe for after dinner.
The party-goers would be hard pressed to have dinner on the table at 5pm, so they can be fed and out the door 5:30-ish to be ontime for a 6pm party. And if they couldn't get dinner fed by 5pm, the party would be at 6pm, cake served close to 7pm... forget about the kid eating dinner at all that night! (at least in my experience)
But if you say cake only, then cake only it is... as a guest, I would find a way for my kid to get something healthy in their belly before the party... if I was alerted ahead of time!
As hostess, I would consider adding inexpensive pizza, but if not possible, as a guest I would appreciate advance notice that it is "cake only" as I would have to make special arrangements for my kid to eat early.
Have fun!