{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openephemeris-com/json-schema/openephemeris-com-timezone-offset-request-schema.json",
  "title": "TimezoneOffsetRequest",
  "description": "Request to compute UTC offset for a coordinate at a specific instant.\n\nCoordinates may be supplied as either `lat`/`lon` (canonical) or `latitude`/`longitude` (accepted alias, matching `/timezone/lookup`). Exactly one complete pair is required; if both pairs are present the canonical `lat`/`lon` wins. A request with no complete coordinate pair is rejected with a 422 validation error — coordinates never default to 0,0.\n\nExactly one of `datetime_utc` (an instant) or `datetime_local` (a naive local wall time resolved at the coordinate, honoring the historical-correction overlay) is required.\n\nNote: `datetime_utc` is a strict RFC 3339 instant and must carry a zone (`Z` or ±HH:MM). A zone-less value is rejected.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openephemeris-com-location-timezone-api-openapi.yml#/components/schemas/TimezoneOffsetRequest",
  "properties": {
    "datetime_local": {
      "description": "Naive local wall-clock datetime (YYYY-MM-DDTHH:MM:SS, no zone suffix) to resolve at the coordinate. Mutually exclusive with datetime_utc — exactly one of the two is required. The zone is resolved from the coordinates, the historical-correction overlay is consulted for pre-1970 dates, and the response reports the resolved offset plus tz_confidence.",
      "title": "Datetime Local",
      "type": "string"
    },
    "datetime_utc": {
      "description": "Instant as a strict RFC 3339 datetime, e.g. '2025-07-01T12:00:00Z'. Must carry a zone ('Z' or ±HH:MM); a zone-less value is rejected.",
      "format": "date-time",
      "title": "Datetime Utc",
      "type": "string"
    },
    "fold_preference": {
      "description": "Only meaningful with datetime_local: which occurrence of a repeated (fall-back) hour to use. See TimezoneInput.fold_preference.",
      "enum": [
        "earlier",
        "later"
      ],
      "title": "Fold Preference",
      "type": "string"
    },
    "lat": {
      "description": "Latitude in decimal degrees. Canonical spelling; alias of 'latitude'.",
      "maximum": 90,
      "minimum": -90,
      "title": "Lat",
      "type": "number"
    },
    "latitude": {
      "description": "Latitude in decimal degrees. Accepted alias of 'lat'; ignored when 'lat' is present.",
      "maximum": 90,
      "minimum": -90,
      "title": "Latitude",
      "type": "number"
    },
    "lon": {
      "description": "Longitude in decimal degrees. Canonical spelling; alias of 'longitude'.",
      "maximum": 180,
      "minimum": -180,
      "title": "Lon",
      "type": "number"
    },
    "longitude": {
      "description": "Longitude in decimal degrees. Accepted alias of 'lon'; ignored when 'lon' is present.",
      "maximum": 180,
      "minimum": -180,
      "title": "Longitude",
      "type": "number"
    },
    "time_standard": {
      "description": "Only meaningful with datetime_local: force interpretation as standard or daylight time instead of the automatic overlay/tzdata resolution. See TimezoneInput.time_standard.",
      "enum": [
        "auto",
        "standard",
        "daylight"
      ],
      "title": "Time Standard",
      "type": "string"
    }
  },
  "type": "object"
}