I don't necessarily mean time zones in the modern sense specifically. Presumably humans have known that the sun rises in the east and sets in the west since pre-history. But how long did it take for people to realize that towns to their east would have an earlier sunrise? How well was this understood before the industrial revolution sped up communication?
You're right that time zones per se are a modern invention. As for the underlying idea, that different parts of the earth experience different times of day (and night), that's been understood since antiquity. Here's Ptolemy, writing in the 2nd century (Almagest 1.4):
For we find that the phenomena at eclipses, especially lunar eclipses, which take place at the same time, are nevertheless not recorded as occurring at the same hour (that is at an equal distance from noon) by all observers. Rather, the hour recorded by the more easterly observers is always later than that recorded by the more westerly. We find that the differences in the hour are proportional to the distances between the places.
Here's the classic former response on a similar question, provided by /u/jschooltiger, who pushes it back to Hipparchus in the 2nd century BCE (I quoted Ptolemy because he's the one whose book actually survives).
In principle this could have been known as soon as the earth's shape was discovered, around 400 BCE, but our only extant discussion of the earth's shape from that era, Aristotle's On the sky, doesn't consider time differences. It seems probable to me that time differences weren't realised until after Aristotle's time.
And, by the way, here's a link dump with a few other answers as well.