Skip to main content
SaloonERP
All articles
Engineering5 min read

The salon's clock, not the phone's

A booking at 10:00 means 10:00 at the salon, whatever time zone the laptop at head office is set to. Getting it right takes one rule, applied everywhere.

In short

  • Store instants; show them in the salon's time zone, never the device's.
  • Calendar dates like a day of leave are not instants and must not shift.
  • Fix a whole feature at once; half-converted screens disagree with each other.

Here is a bug that every booking system ships at least once. The owner books a customer for 10:00 from a laptop that is set to a different time zone than the salon. The diary at the salon shows the booking at the wrong hour. Nobody notices until the customer arrives.

The rule

A moment in time is stored once, as an instant. Whenever it is shown, it is shown in the time zone of the branch it belongs to. Not the browser's, not the phone's, not the server's. A branch in Kathmandu and a branch in Dubai each read their own diary in their own local time, and the owner sees each one as the branch sees it.

What the rule does not cover

Some dates are not moments. A day of leave, a payroll month, a roster day: these are squares on a calendar, not points on a timeline. Convert one of them through a time zone and it lands a day early for half the world. Those are kept as plain dates and shown as plain dates.

How we fixed it for good

  1. 1One helper for "this instant, in this salon's time", and one for "this salon-time date and hour, as an instant".
  2. 2Every screen in a feature converted together, so the diary, the booking form and the confirmation never disagree.

The result is boring, which is what you want from a clock.

Your chairs are booked. Your books shouldn’t be a guess.

Set up in an afternoon. Cancel whenever.