TimezoneDB · Schema

ConvertTimeZoneResponse

Response schema for the TimezoneDB convert-time-zone endpoint. Returns converted timestamps and metadata for source and destination timezones.

TimezoneTimeGeographic CoordinatesDSTUTC OffsetTime ConversionLocation

Properties

Name Type Description
status string Query result status.
message string Error message; empty string if successful.
fromZoneName string IANA timezone name of the origin timezone.
fromAbbreviation string Timezone abbreviation of the origin timezone.
fromTimestamp integer Unix timestamp of the origin time.
toZoneName string IANA timezone name of the destination timezone.
toAbbreviation string Timezone abbreviation of the destination timezone.
toTimestamp integer Unix timestamp of the equivalent time in the destination timezone.
offset integer Difference in seconds between origin timezone and destination timezone. Positive means destination is ahead of origin.
View JSON Schema on GitHub

JSON Schema

convert-time-zone-response.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/timezonedb/refs/heads/main/json-schema/convert-time-zone-response.json",
  "title": "ConvertTimeZoneResponse",
  "description": "Response schema for the TimezoneDB convert-time-zone endpoint. Returns converted timestamps and metadata for source and destination timezones.",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Query result status.",
      "enum": ["OK", "FAILED"],
      "examples": ["OK"]
    },
    "message": {
      "type": "string",
      "description": "Error message; empty string if successful.",
      "examples": [""]
    },
    "fromZoneName": {
      "type": "string",
      "description": "IANA timezone name of the origin timezone.",
      "examples": ["America/Los_Angeles"]
    },
    "fromAbbreviation": {
      "type": "string",
      "description": "Timezone abbreviation of the origin timezone.",
      "examples": ["PDT"]
    },
    "fromTimestamp": {
      "type": "integer",
      "description": "Unix timestamp of the origin time.",
      "examples": [1464793200]
    },
    "toZoneName": {
      "type": "string",
      "description": "IANA timezone name of the destination timezone.",
      "examples": ["Australia/Sydney"]
    },
    "toAbbreviation": {
      "type": "string",
      "description": "Timezone abbreviation of the destination timezone.",
      "examples": ["AEST"]
    },
    "toTimestamp": {
      "type": "integer",
      "description": "Unix timestamp of the equivalent time in the destination timezone.",
      "examples": [1464854400]
    },
    "offset": {
      "type": "integer",
      "description": "Difference in seconds between origin timezone and destination timezone. Positive means destination is ahead of origin.",
      "examples": [61200]
    }
  },
  "required": ["status", "message"]
}