LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. The life of a click
  4. · 4 minutes · Pro

4am for a 10am booking

A customer in Chicago books a 10am appointment. Your confirmation email says 4am. The calendar page says 10am.

This answers: Why does my app show the wrong time? No coding needed. 2 quick decisions.

  • Where your data lives
  • Debugging without panic

Checking your access…

Why does my app show the wrong time?

The time was probably stored without a , so the server and the browser each guess one. Store moments as timestamptz in Postgres (an exact moment, kept as UTC), store each user's time zone separately, and convert to local time only when displaying, using the same rule on server and browser.

Trail of the bug
  1. Browser
  2. Database
  3. Email service

Breaks at Database: Time saved without a zone

Why AI tools write this bug

Generated schemas often use a plain timestamp column, and generated code formats dates wherever it needs them, with whatever zone that machine uses.

How to fix it

  1. Use (or equivalent) for moments in time.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Why does the server show a different time from the browser?
Servers usually run in UTC; browsers use the visitor's local zone.

Related scenarios

  • Permission denied for tablePro · 4 min
  • The webhook that arrived twicePro · 5 min
  • Off by one centPro · 4 min

More on this trail

The life of a click: Follow one button press from the browser to the database and back.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

2 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Use (or equivalent) for moments in time.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock