Skip to content
All lines on time

ZTime zonesAll posts

Time zones that are off by half an hour

About one person in five lives somewhere the clock is not a whole number of hours from UTC. Scheduling software forgets them with surprising regularity.

Published
Reading time
3 min · 656 words
Line
ZTime zones
Written by
ARAnanya Rao · Engineer, time zones
In this post 3 stops
  1. Who lives off the hour
  2. Four ways software gets it wrong
  3. The rules we build by

I work from Bengaluru, five and a half hours ahead of UTC. In my first week at Halfpast a colleague in London proposed a call “at 2 your time” using a tool I will not name. It arrived in my calendar at 14:30. The tool had rounded India to the nearest hour, and then apologised for nothing.

Half-hour zones are treated as a curiosity, a pub-quiz fact about Nepal. They are not rare. India alone is about 1.4 billion people, and every one of them is thirty minutes off the grid that most slot pickers assume.

Who lives off the hour

Offsets from UTC in standard time
PlaceOffsetWorth knowing
India, Sri Lanka+5:30No clock changes
Nepal+5:45One of the few quarter-hour zones
Iran+3:30Stopped changing its clocks in 2022
Afghanistan+4:30No clock changes
Myanmar+6:30No clock changes
South Australia+9:30Moves to +10:30 in summer
Northern Territory+9:30Same offset, never changes
Newfoundland−3:30Moves to −2:30 in summer
Lord Howe Island+10:30Its summer shift is 30 minutes
Chatham Islands+12:45Moves to +13:45 in summer

Two rows deserve a second look. Adelaide and Darwin share an offset for half the year and differ for the other half. And Lord Howe Island moves its clocks forward by thirty minutes, not sixty, which breaks any code that treats daylight saving as “add one hour”.

LondonUTC+0

BengaluruUTC+5:30

KathmanduUTC+5:45

St John'sUTC−3:30

A 09:00 to 17:00 working day in four cities, drawn on London's clock. Bengaluru and Kathmandu start fifteen minutes apart; St John's ends at 20:30 London time.

Four ways software gets it wrong

Storing the offset as a whole number

Somewhere there is a database column called utc_offset with the type integer. India is saved as 5 or 6, depending on how the rounding felt that day. Every meeting is then wrong by thirty minutes, in a direction that changes with the code path.

Storing the offset at all

An offset is a fact about one instant. Adelaide is +9:30 in July and +10:30 in January. A booking saved as “10:00 at +9:30” for a date in summer is an hour out before anyone has done anything. Save the zone's name, Australia/Adelaide, and let the time zone database do the rest.

Snapping slots to the guest's hour

A host in London offers 09:00, 09:30 and 10:00. To a guest in Kathmandu those are 14:45, 15:15 and 15:45. Some pickers “tidy” these to 15:00 and 16:00, and the guest arrives fifteen minutes late to a meeting they booked correctly. Slots belong to the host's clock. Show the guest the real times, odd minutes included.

Assuming everyone changes clocks together

London and New York are five hours apart, except for the two or three weeks in March and one in the autumn when they are four. India never changes. A weekly call between London and Bengaluru moves by an hour for one of them twice a year, and somebody has to be told which.

An offset is a fact about one instant. A zone is a promise about all of them.

The rules we build by

  1. Store instants in UTC and zones by name. Never store an offset.
  2. Generate slots on the host's clock, convert each one to the guest's zone, and display the result without rounding.
  3. Say whose time it is, on the page: “Times shown in India Standard Time”. Let the guest change it.
  4. Test with Kathmandu, Adelaide and Lord Howe Island. If those three pass, London to New York will look after itself.
  5. In the week of a clock change, show the change: “This meeting is at 15:30 for you this week, not 14:30.”

My 14:30 call was moved, eventually, to 14:00. The colleague who sent it now works on our slot generator. We both consider this justice.

Next departure

The next meeting could leave on time.

Publish a booking link with a sensible length, a buffer and a reminder. It takes about four minutes, and the free plan has no time limit.

Or try the live booking page

09:18Your clock
London

Your first ten minutesPlat.
  1. 09:18Sign up1
  2. 09:20Connect calendar1
  3. 09:22First link live2
  4. 09:27First booking3