“Good evening” at 3pm is a small bug with a large tell: it says the greeting was hard-coded, or that it is running on server time in a timezone nobody using the product lives in. The Dynamic Time Greeting shows which greeting applies right now in any timezone you select, along with the exact boundaries of all 4 slots.
The bands are Good Morning from 5:00 AM, Good Afternoon from noon, Good Eveningfrom 5:00 PM and Good Night from 9:00 PM. The night band is the one that catches implementations out, because it wraps across midnight and covers 8 hours in two separate runs of the clock.
Every conversion uses the timezone database already built into your browser, so daylight saving is handled without a network call or an API key. Your chosen zone is remembered locally between visits, and the choice never leaves the device.
The Controls and the Slot Table
- The zone selector is grouped by region and opens on Local Device Time, with UTC / GMT as the next option for checking what a server would say.
- Each of the 4 slots shows its range and a sample time, so Evening is labelled 5:00 PM to 8:59 PM with 18:45 as its example.
- The active slot is highlighted as the clock moves, which means leaving the page open across a boundary shows you the handover rather than requiring a reload.
- The night slot carries an alternative wording of Late Shift, which is the phrasing to reach for when a greeting at 11pm should not imply the user is going to bed.
- Picking a zone such as US Mountain, no DST — Phoenix alongside Denver is the fastest way to see a daylight-saving difference without waiting for a clock change.
Edge Cases in Time-Based Greetings
- Midnight is inside the night band, not the start of morning. A slot table built from simple ranges usually breaks here, because 23:00 and 01:00 belong together despite being at opposite ends of a 24-hour axis.
- The browser clock is the device clock. A user with the wrong time set sees the wrong greeting, and no server-side check can correct it if the greeting is rendered on the client.
- Rendering a time-based greeting during server-side rendering produces a mismatch, because the server and the browser can be in different bands. Compute it after mount or accept the flash.
- These boundaries are an English-language convention. Several cultures split the day differently, and a few have no direct equivalent of a distinct evening greeting at all.
- Half-hour and quarter-hour offsets exist, so a boundary can fall at 5:30 or 5:45 local. The zone list includes such regions, which is worth checking before you assume every boundary lands on the hour.