← Integration Engineering
Integration Engineering

Dates and Time Zones: Store Time in UTC, Show It in Local Time

8 Oct 2026·3 min read

My tool posts to LinkedIn at 9 in the morning, Karachi time. But its timer is set to 04:00, because the server thinks in UTC, the world’s reference clock. Pakistan is UTC+5 all year, so 04:00 UTC is 09:00 in Karachi.

UTC inside, local on the screen

  • Store and send every time in UTC. Never store a time with no zone, like "2026-10-06 09:00". Nine o’clock where?
  • Use ISO 8601, like 2026-10-06T04:00:00Z. The Z means UTC. An offset like +05:00 works too.
  • Convert to local time only at the last step, when you show it to a person.
node -e "console.log(new Date('2026-10-06T09:00:00+05:00').toISOString())"
Takes 9 AM Karachi time and prints it in UTC: 2026-10-06T04:00:00.000Z. Same moment, written two ways.

Watch out for daylight saving

Many countries move their clocks twice a year. New York is UTC-4 in summer and UTC-5 in winter. So use a zone name like America/New_York, not a fixed -5. A fixed offset that is right today can be wrong next month.

Do this in 60 secondsFind a date field in any API response you use. Does it end in Z or have an offset? If not, write down which zone it is in, or ask the provider.
Today’s AI angleTell an AI agent "book a call tomorrow at 9", and it has to guess whose 9. A model does not know the current time or your zone unless you tell it. Pass both in.
Dates and Time Zones: Store Time in UTC, Show It in Local Time · Ali Huzaifa