sethserver.com Subscribe
A retro-style orange and teal robot with a grimacing expression stands in the center, surrounded by multiple colorful calendars (labeled with months like "TIMHSMTWTF", "MINKUEES", "JOENI", "EFME", "SHOWS", "HUIY", and "MAIBUMP") and various analog clocks in pink, yellow, orange, and other bright colors against a pale yellow background.

Why I Only Use UTC and Why You Should Too

By Seth Black • Updated: June 29, 2026

Programming · 7 min read

Like this kind of writing? Get one email a week with notes on startups, AI, and the occasional strong opinion about Python: subscribe to the newsletter.

Let's acknowledge the obvious: yes, this is a clickbait title. I don't only use UTC.

But for almost all database, backend, ops, and maintenance code I keep everything in UTC. Time zones show up at the very last display step. And even then, it's a setting the user can change whenever they want.

That one habit has saved me from a pile of bugs that are dumb, expensive, and politically painful to untangle.

The real enemy is DST (and the people who "manage" it)

Daylight Savings Time in the US is a recurring prank. Twice a year, you get to wonder:

A lot of systems quietly assume time is predictable:

DST breaks the basic promise that "an hour later" is always "one hour later." Sometimes the hour never happens. Sometimes it happens twice.

And yes, Arizona mostly opts out, which means your code can be wrong in different ways depending on where the user lives. Great system.

I'm also glad politicians got to pick what time the sun rises and sets. I'm sure that went through rigorous testing.

What DST bugs look like in real systems

A few concrete failure modes I've watched teams trip over:

  1. The "missing hour" appointment
  2. User schedules something for 2026-03-08 02:30 in a DST-observing timezone.
  3. That local time might not exist.
  4. Some libraries "fix" it by shifting forward to 03:30.
  5. Others raise an error.
  6. Others store it anyway and you don't find out until reminders fail.

  7. The "duplicate hour" double charge

  8. At fall-back, 01:15 happens twice.
  9. If you store naive local timestamps and later "group by hour," you can double count.
  10. If you run a job "every hour" based on local wall time, you might run it twice.

  11. The "why are logs out of order" incident

  12. You're tracing a request across services.
  13. Service A logs in Pacific time, Service B logs in UTC, Service C logs in whatever the container image default is.
  14. You can't tell what happened first without doing timezone math while stressed.

DST bugs aren't hard in an interesting way. They're hard because they're intermittent and annoying. They show up twice a year, then disappear long enough for everyone to forget what happened.

UTC on the server side means fewer late-night arguments

On a new team, I ask questions fast. What's breaking? Who's stuck? What's on fire? Where are the skeletons?

Time bugs show up in so many of those conversations. Logs and scheduled jobs are the usual hotspots. If your logs are in local time, debugging turns into a guessing game. If your database stores local time, you're signing up for extra confusion later.

UTC is consistent. That's the deal.

Consistent buys you:

Example: deployment tags that don't lie

I like date-time based deployment tags because they sort naturally, you can read them without a decoder ring, and they don't require a meeting to decode. Something like:

202601011513-prod
Meaning: Jan 1st, 2026 at 15:13 UTC, deployed to prod.

This same mindset works for log files, backups, and incident timelines. You want the system to behave like a machine, not like a moody teen.

Why UTC tags are better than "v1.2.7" (sometimes)

Version numbers are fine, but they have issues:

A UTC timestamp tag gives you:

If you tag deploys in local time, DST will eventually hand you two tags that look an hour apart but happened minutes apart. Or the reverse. Either way, now you're doing time math during an incident.

UTC tags avoid that. They also make cross-region ops sane. Your teammate in Berlin and your teammate in Seattle can read the same tag and agree on what happened.

Implementation detail: generating the tag

Here's a simple Python snippet that generates the format reliably:

from datetime import datetime, timezone

def deploy_tag(env: str) -> str:
    stamp = datetime.now(timezone.utc).strftime("%Y%m%d%H%M")
    return f"{stamp}-{env}"

print(deploy_tag("prod"))  # 202601011513-prod

If you want seconds too, use %Y%m%d%H%M%S. I usually don't bother.

Tradeoff: timestamp tags don't tell you what changed. That's what commit messages and release notes are for. The tag is just a coordinate on the timeline.

Django: store UTC, show local time

Here's the pattern I use in Django:

  1. Store timestamps in UTC in the database
  2. Convert to the user's timezone only at render time (template or serializer)

In settings.py:

USE_TZ = True
TIME_ZONE = "UTC"

Then in your model, just use normal Django fields:

from django.db import models

class Event(models.Model):
    name = models.CharField(max_length=200)
    starts_at = models.DateTimeField()  # stored as UTC when USE_TZ=True
    created_at = models.DateTimeField(auto_now_add=True)

That's the easy part. The part that causes pain is what people do next.

Don't:

Handling user preference

Say the user has a saved timezone like "America/Los_Angeles".

Store the timezone name, not an offset. "UTC-8" is not a timezone. It's a rough description that becomes wrong twice a year.

Example profile model:

from django.conf import settings
from django.db import models

class Profile(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
    timezone = models.CharField(max_length=64, default="UTC")  # IANA name

Now in your view:

from django.shortcuts import render, get_object_or_404

def event_detail(request, event_id):
    event = get_object_or_404(Event, id=event_id)
    user_tz = getattr(request.user.profile, "timezone", "UTC")
    return render(request, "event_detail.html", {"event": event, "user_tz": user_tz})

In your template:

{% load tz %}

{% timezone user_tz %}
  <p>Starts: {{ event.starts_at|date:"Y-m-d H:i:s T" }}</p>
{% endtimezone %}

Database stays UTC. Backend logic stays consistent. Users see local time. No surprises.

Floating time vs absolute time

Some events are absolute. Some are "floating."

Floating time is where people get burned. If you store only UTC, "9:00 AM local" becomes "some UTC value" that depends on timezone rules and may change when the user changes zones.

How I handle it:

That's more work. But it matches what the user meant. If you try to cram "floating time" into a single UTC timestamp forever, you'll eventually surprise someone.

API version (DRF)

If you're using Django REST Framework, you can return UTC in the API (simple and consistent) and let the frontend localize. Or return both.

Example: return ISO 8601 UTC plus a user-local string:

from django.utils import timezone
from zoneinfo import ZoneInfo

def to_user_local(dt, tz_name: str):
    tz = ZoneInfo(tz_name)
    return timezone.localtime(dt, tz)

## dt is aware UTC datetime from DB
local_dt = to_user_local(event.starts_at, user_tz)

Timezone conversion per row costs CPU. If you're returning 5,000 rows, you might prefer:

My rule

Not fancy. Not innovative. It just prevents bugs that wake someone up in the middle of the night and teach them nothing useful.

If you want a simple checklist:

UTC won't fix every time problem. But it wipes out the dumb ones, which is most of them. Similar to how Excel's date handling quirks created decades of compatibility issues, time zone bugs compound when you don't establish clear conventions early.

-Sethers

Share this post
Newsletter

One email, once a week.

Notes on databases, systems, and the occasional strong opinion about Python. No spam, unsubscribe anytime.

Seth Black
Written by

Seth Black

Engineer and founder based in Texas. Writes about databases, AI, and running things in production. Embeds in small teams as lead engineer.

More from Programming

View all →
Programming

What's the Differences Between Relational, NoSQL, Vectors, and Caches

Apr 14, 2026
Programming

Git and Source Control in AI Land

Apr 14, 2026
Programming

Domains, DNS, and why it feels fragile

Apr 14, 2026