Debug a Timezone Bug That Sends Check-In Reminders a Day Early

Last updated: November 29, 2026

Quick Overview

Guests in Los Angeles report getting 'your check-in is today' messages the evening before they arrive, and a DST weekend shows a stay as the wrong number of hours. Find the root cause, fix it, and describe how you would test date logic so this does not regress.

Airbnb
Software Engineering Fundamentals
Software Engineer
Airbnb
November 29, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Easy

0

0

0 solved


Guests in Los Angeles report getting 'your check-in is today' messages the evening before they arrive, and a DST weekend shows a stay as the wrong number of hours. Find the root cause, fix it, and describe how you would test date logic so this does not regress.

Airbnb listings span every timezone, and a stay is defined in the listing's local calendar while servers run in UTC. This debugging question checks whether you can reason from symptoms to a root cause and know the standard rules for dates versus instants.

What the Interviewer Expects
  • Form a hypothesis from the symptom: evening in the Americas means the UTC date already rolled over
  • Distinguish calendar dates from absolute instants
  • Compute 'today' in the listing's IANA timezone, not the server's
  • Count nights by date difference, never by hours divided by 24
  • Write tests around midnight boundaries and DST transitions
Key Topics to Cover
testing and debugging
timezones
DST
date handling
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • Which timezone should a reminder use, the guest's or the listing's?
  • How would you store check-in times in the database?
  • How would you find other places in the codebase with the same bug?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Reminders must fire on the check-in date as experienced at the listing. Nights count calendar dates. Fix the bug and add tests that would have caught it....

High-Level Design

Debugging path: reproduce with a fixed clock. At 7:30pm on March 7 in Los Angeles it is already 03:30 UTC on March 8, so code comparing utcnow().date() to a March 8 check-in fires the evening before...


Submit Your Answer
Markdown supported