We recommend eating 1-2 hours before a workout and within 30-60 minutes after a workout!
Pre-workout is broader due to how people handle digestion before they workout. If you're eating a couple of hours beforehand, try and fill up on complex carbs like sweet potatoes or oats, which are slow-digesting so the energy you get from the glycogen will be more evenly timed with your workout. If you're eating 30 minutes before a workout, quick-digesting simple carbs like a sports drink or a piece of fruit would be the better choice.
Post workout is a critical time window for recovery purposes. You can eat as soon as you are done working out (something quick like a protein shake), and no more than an hour after working out. Your post workout is the most important and should have plenty of carbs and protein to ensure optimal recovery.
If you workout early in the mornings and can't stomach much beforehand, that's fine. You can train fasted and ensure that you eat enough for your post workout meal!
If you workout in the evenings, just make sure that you are still getting a good post workout meal in, even though it will be a little before bed time.