Here's a breakdown of when to use it:
* Morning: From sunrise until noon, "bonjour" is the appropriate greeting.
* Afternoon: From noon onward, "bon après-midi" (good afternoon) is used.
* Evening: After 6 pm, you can say "bonsoir" (good evening).
However, "bonjour" is often used as a general greeting throughout the day, even if it's technically not the most accurate for the time of day. It's a polite and versatile greeting that's always appreciated.