UTC Storage vs. Local Display: A Best Practice for Datetime Design
Why store in UTC and display in local time is standard practice, the problems with storing local time, and the cases where storing local time is the right call.
When designing a system that handles dates and times, "store everything in UTC in the database, and convert to the user's local time only right before displaying it" is a widely known rule of thumb. Here's why that design is recommended.
The problem with storing local time directly
If you store a datetime in the user's local time as-is, there's no way to later determine which time zone it was originally based on. A value like "2026-08-06 21:00" alone doesn't tell you whether that's Japan time or New York time, so you can't correctly convert and display it to a user in a different time zone.
The advantage of standardizing on UTC
Storing every datetime in UTC lets internal system logic — comparing periods, sorting, calculating elapsed time — stay simple, without needing to think about time zones at all. Only at the display stage does the system need to convert to local time, based on the viewer's time zone setting, which cleanly separates that responsibility from everything else. Standardizing on UTC also means the stored value keeps the same meaning even if a server moves location or the system grows into a multi-region setup. This site's world clock works the same way internally: it calculates every city's time on a UTC basis, converting to each city's local time zone only right before display.
The exception: cases where storing local time is the right call
That said, for something like "notify me every Monday at 9 AM" — a schedule meant to reproduce a specific region's local time repeatedly — you need to store the local time (plus the target time zone identifier) rather than converting it to a fixed UTC value up front. If you convert to UTC and lock it in, the notification time will drift unintentionally whenever that region's daylight saving time changes (see also "How Daylight Saving Time Affects Recurring Online Meetings").
The takeaway: distinguish "when it happened" from "when it should keep happening"
A one-time, already-settled event (like a log timestamp) belongs in UTC. A schedule meant to recur into the future belongs in local time plus a time zone identifier. Which design fits depends on the nature of the data you're handling. The moment an order was confirmed calls for UTC; a "happy birthday" message meant to go out every year at the same local moment calls for local time — thinking through specific examples like these makes the choice easier to reason about.