Prompt

interview scheduling API with timezone support

Technology / Scheduling & Booking Software1 observationLast seen Oct 16, 2026

Latest observation

Oct 16, 2026OpenAI APIWeb search: off

Here’s a solid design for an Interview Scheduling API with timezone support.

Core goals

  • Let candidates/interviewers pick times in their local timezone
  • Store times consistently in UTC
  • Avoid DST bugs and ambiguous/non-existent local times
  • Support meeting creation, availability checking, rescheduling, and cancellation

Recommended rules

  1. Client sends local datetime + timezone
    • Example:
      {
        "startLocal": "2026-03-10T09:00:00",
        "timeZone": "America/Los_Angeles"
      }
      
  2. Server validates and converts to UTC
    • Store:
      • start_at_utc
      • end_at_utc
      • original time_zone
  3. Always return both UTC and localized display time
  4. Use IANA time zone IDs only
    • Good: America/New_York, Europe/London
    • Avoid offsets only like -05:00 because they don’t handle DST correctly
  5. Reject ambiguous or invalid local times
    • Example DST gap: 2026-03-08 02:30 in America/New_York may not exist
    • Example DST overlap: 2026-11-01 01:30 may map to two different UTC instants

Data model

Interview

{
  "id": "int_123",
  "candidateId": "cand_456",
  "interviewerId": "usr_789",
  "startAtUtc": "2026-03-10T16:00:00Z",
  "endAtUtc": "2026-03-10T16:30:00Z",
  "timeZone": "America/Los_Angeles",
  "status": "scheduled",
  "createdAt": "2026-02-01T12:00:00Z",
  "updatedAt": "2026-02-01T12:05:00Z"
}

Availability window

{
  "userId": "usr_789",
  "dayOfWeek": 2,
  "startLocal": "09:00",
  "endLocal": "17:00",
  "timeZone": "America/New_York"
}

API endpoints

1. Create interview

POST /interviews

Request

{
  "candidateId": "cand_456",
  "interviewerId": "usr_789",
  "startLocal": "2026-03-10T09:00:00",
  "durationMinutes": 30,
  "timeZone": "America/Los_Angeles"
}

Response

{
  "id": "int_123",
  "startAtUtc": "2026-03-10T16:00:00Z",
  "endAtUtc": "2026-03-10T16:30:00Z",
  "timeZone": "America/Los_Angeles",
  "status": "scheduled"
}

2. Get interview

GET /interviews/{id}

Response

{
  "id": "int_123",
  "candidateId": "cand_456",
  "interviewerId": "usr_789",
  "startAtUtc": "2026-03-10T16:00:00Z",
  "endAtUtc": "2026-03-10T16:30:00Z",
  "timeZone": "America/Los_Angeles",
  "startLocal": "2026-03-10T09:00:00",
  "endLocal": "2026-03-10T09:30:00",
  "status": "scheduled"
}

3. Check availability

GET /availability?userId=usr_789&date=2026-03-10&timeZone=America/Los_Angeles

Response

{
  "date": "2026-03-10",
  "timeZone": "America/Los_Angeles",
  "availableSlots": [
    {
      "startLocal": "2026-03-10T09:00:00",
      "endLocal": "2026-03-10T09:30:00"
    }
  ]
}

4. Reschedule interview

PATCH /interviews/{id}/reschedule

Request

{
  "startLocal": "2026-03-11T10:00:00",
  "durationMinutes": 30,
  "timeZone": "Europe/London"
}

Response

{
  "id": "int_123",
  "startAtUtc": "2026-03-11T10:00:00Z",
  "endAtUtc": "2026-03-11T10:30:00Z",
  "timeZone": "Europe/London",
  "status": "scheduled"
}

5. Cancel interview

DELETE /interviews/{id} or POST /interviews/{id}/cancel


Important timezone handling logic

Convert local to UTC

Pseudo:

input: local datetime, timeZone
1. parse local datetime
2. resolve against IANA zone rules
3. if invalid/non-existent -> return 400
4. if ambiguous -> require disambiguation or return 400
5. convert to UTC
6. store UTC + original timeZone

Handle DST ambiguity

For overlap times, you may need:

{
  "startLocal": "2026-11-01T01:30:00",
  "timeZone": "America/New_York",
  "fold": 1
}

If you want to keep the API simpler, return an error and ask the client to pick a different time.


Suggested validations

  • timeZone must be valid IANA zone
  • local start time must be within business hours
  • duration must be positive and within allowed range
  • start must not overlap existing interviews
  • interviewer and candidate availability must both match
  • disallow non-existent/ambiguous local datetimes unless explicitly resolved

Best practices

  • Store timestamps in UTC in the database
  • Store the original timezone as metadata
  • Use a timezone-aware library:
    • JavaScript: Luxon, date-fns-tz, Temporal (when available)
    • Python: zoneinfo, pendulum
    • Java: java.time
    • .NET: NodaTime
  • Include timezone in all user-facing date/time responses
  • Test DST transitions thoroughly

Example error response

{
  "error": "INVALID_LOCAL_TIME",
  "message": "2026-03-08T02:30:00 does not exist in America/New_York due to daylight saving time transition."
}

If you want, I can also provide:

  1. a full OpenAPI spec
  2. a PostgreSQL schema
  3. a Node.js/Express implementation
  4. a Python/FastAPI implementation

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.