Scheduling Apps, Calendars, and Bookings

Keep the meaning of a time and the rules for a booking intact across time zones, competing requests, cancellations, reminders, and calendar sync.

Content date: October 15, 2026.

Plain English

A booking combines four things: what a time means, how much of a resource is available, who has authority to book it, and how the booking's state changes. A weekly appointment tied to a named time zone is different from adding 168 hours over and over. An all-day date is different from midnight UTC. An outside calendar can tell you what's free, but that doesn't make your own booking safe, and availability on a screen can go stale before someone clicks Book.

Use this when

Use this when your product really reserves something or syncs appointments with a calendar. If a simple local arrangement meets the need, skip the calendar integration.

If you are just starting

Run the free practice labs for booking, cancellation, and time zones, using made-up people. Write down what each one covers: unique fixed slots, selected cancellation rules, or showing known moments in time. The labs don't handle overlapping time ranges, recurring events, sign-in with Google (OAuth), syncing with a provider, or delivered reminders. Keep those on your list of things still to check in the workbook.

When your project grows

Decide each slot's capacity, length, and buffer, how long a hold lasts, who decides availability, the booking and cancellation states, safe repeats (idempotency), and what happens to a reminder when a booking changes. Store the intended local time with its named time zone, and decide how to handle ambiguous or nonexistent times (the hour a daylight-saving change repeats or skips). Enforce limits inside a database transaction, since a grayed-out button isn't enough. Ask for the narrowest Google Calendar scope that works, such as calendar.freebusy for availability only or calendar.events.owned for events on the user's own calendars. A public app requesting certain scopes must pass Google's verification, so check yours. Tie each connection to one account, share little of titles and attendees, and show confirmed bookings separately from provider-pending ones. If Google returns 410 for your sync token, Google says to clear your local copy of that calendar and run a full sync. Never erase your own authoritative bookings or other accounts' data.

Worked example

Two made-up customers try to book the same slot at a tutoring studio, and the database's unique constraint lets exactly one succeed. Separately, the time-zone lab shows the same local hour twice on the night clocks fall back, with two offsets. Neither lab can decide what to do with a newly entered ambiguous time. If a Google sync token expires, the plan rebuilds only that connection's copy and leaves the studio's own bookings alone.

Practice

Verify local booking boundaries and plan calendar failures

  1. Run the linked reliability, cancellation, and locale labs by following their READMEs, each in its own folder.
  2. Record the competing-booking result, the time-zone display cases, and your runtime versions.
  3. For the workbook's recurring example, choose what the schedule means and how to treat ambiguous or nonexistent times, and mark the implementation not done.
  4. Trace a queued reminder after cancellation, a provider timeout and retry, a stale notification, revoked access, and an invalid sync token.

Deliverable: Your lab observations, your scheduling and ambiguous-time decisions, and a table of booking, reminder, and sync failures with the live checks that remain.

Common mistakes to watch for

  • Two clients book the same 3 p.m. slot from availability that went stale.
  • A weekly 9 a.m. club meeting jumps to 8 a.m. after daylight saving changes.
  • A canceled event comes back because an old sync update arrives late.
  • A reminder queued yesterday goes out for a booking the customer already canceled.

Prompting

A weak prompt

Store every date as UTC midnight, trust the displayed slots, and mirror every calendar update in arrival order.

A better prompt

Help me design scheduling for [my business]. State what a time means (with its time zone), the capacity, slot length and buffers, the booking and cancellation rules, and how to treat ambiguous local times. Run the supplied local labs for competing bookings, cancellation, and known instants, and say what each doesn't cover. Re-check the current booking before any reminder. For Google Calendar sync, handle duplicates, revoked access, stale updates, and an invalid sync token with the narrowest permission. Don't claim the labs implement live sync or overlapping-time scheduling.

The booking system, not the calendar display or the provider's messages, has to be the thing that decides whether a booking exists.

Check before you move on

  • Every stored time has an explicit meaning and time zone.
  • Capacity is enforced when the booking is saved.
  • A cancellation also cancels or revises queued reminders.
  • Provider states such as pending or failed are shown as they are.
  • A sync reset rebuilds only that one connection's copy.
  • Calendar data is limited to what the feature needs.

You are done when

  • You can say which results come from the fixed-slot and known-instant labs, and which behavior (overlaps, recurrence, live provider sync) they don't test.
  • Your failure table protects local bookings and keeps accounts separate when a sync update is stale or a reminder was canceled.

Questions to think about

A weekly 9 a.m. appointment is stored as "add 24 hours" each day. What breaks when clocks change?

Elapsed hours don't match wall-clock time across a daylight-saving change, so the appointment shifts an hour. Store the local time with its named time zone and the recurrence rule.

Google Calendar returns 410 for your sync token. Does your app delete all its local bookings?

No. Rebuild your copy of that provider calendar with a full sync. Your own authoritative bookings and other accounts' data stay as they are.

A reminder was queued before the customer canceled. Is it still fine to send?

Not just because it's queued. The queue holds an old view of the booking, so re-check the booking's current state right before sending.

Official references