imasrxd saidIt's all about rest and recovery. You just need to give your body time to build back up after you've torn it down by working out. If you feel good, go for it. If you're feeling beat up, you should rest. There's no hard and fast rule.
On a side note, I think it's funny that a lot of people think it's okay to workout after work one day and then in the morning the next day but not okay to workout in the morning and evening of the same day. It's still about twelve hours between workouts but you haven't slept. Your body could still rest/recover depending on what you did during the day.
In short, don't focus on the time between workouts. Instead, focus on how your body feels.
Well saying something is not "ok" is silly regardless..whatever works best is what matters, but when asking for advice as a newbie, there are usually pretty generally applicable guidelines.
Your body will not recover effectively without sleeping first. Muscle grows while you sleep, for a lot of reasons. Working out before and after good sleep is 100% ok and not at all comparable to working out twice in the same day without sleep.
I don't think anyone here said working out twice in a day is a bad thing in all cases, just that working out chest twice in the same day was less than optimal. If you do it properly the first time there will be no benefit to doing it again a few hours later, especially before sleeping.