TimezoneDB Conversion API

Operations for converting time between timezones

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/timezonedb-conversion-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

timezonedb-conversion-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: TimezoneDB Conversion API
  description: 'TimezoneDB is a REST API providing timezone information for cities and coordinates worldwide. It supports looking up local time, GMT offset, and daylight saving time (DST) status by timezone name, geographic coordinates (latitude/longitude), city name, or IP address. The service also supports converting times between timezones and listing all 400+ supported timezones across 240+ countries. Responses are available in JSON or XML formats.

    '
  version: '2.1'
  contact:
    name: TimezoneDB Support
    url: https://timezonedb.com/contact
  termsOfService: https://timezonedb.com/terms-and-conditions
  license:
    name: Commercial
    url: https://timezonedb.com/premium
servers:
- url: https://api.timezonedb.com/v2.1
  description: TimezoneDB API v2.1
security:
- apiKey: []
tags:
- name: Conversion
  description: Operations for converting time between timezones
paths:
  /convert-time-zone:
    get:
      operationId: convertTimeZone
      summary: Convert Time Zone
      description: 'Convert a Unix timestamp (or current time) from one timezone to another. Provide the source and destination timezones by name or abbreviation, and optionally specify a Unix timestamp to convert. Returns both source and destination timestamps along with timezone metadata.

        '
      tags:
      - Conversion
      parameters:
      - name: key
        in: query
        required: true
        description: Your unique API key obtained after registering an account.
        schema:
          type: string
      - name: format
        in: query
        required: false
        description: Response format. Defaults to xml.
        schema:
          type: string
          enum:
          - xml
          - json
          default: xml
      - name: callback
        in: query
        required: false
        description: JavaScript JSONP callback function name.
        schema:
          type: string
      - name: fields
        in: query
        required: false
        description: Comma-separated list of field names to include in the response.
        schema:
          type: string
      - name: from
        in: query
        required: true
        description: 'A valid timezone name or abbreviation to convert from. Example: "America/Los_Angeles" or "PDT".

          '
        schema:
          type: string
          example: America/Los_Angeles
      - name: to
        in: query
        required: true
        description: 'A valid timezone name or abbreviation to convert to. Example: "Australia/Sydney" or "AEST".

          '
        schema:
          type: string
          example: Australia/Sydney
      - name: time
        in: query
        required: false
        description: 'Unix timestamp of the origin timezone to convert. Defaults to current UTC time.

          '
        schema:
          type: integer
          format: int64
          example: 1464793200
      responses:
        '200':
          description: Successful response with converted timezone information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertTimeZoneResponse'
              examples:
                laToSydney:
                  $ref: '#/components/examples/ConvertTimeZoneLAToSydney'
        '400':
          description: Bad request — missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error response returned when a query fails.
      properties:
        status:
          type: string
          description: Always "FAILED" for error responses.
          enum:
          - FAILED
          example: FAILED
        message:
          type: string
          description: Human-readable error message describing the failure.
          example: Invalid API key.
    ConvertTimeZoneResponse:
      type: object
      description: Response from the convert-time-zone endpoint.
      properties:
        status:
          type: string
          description: Query result status.
          enum:
          - OK
          - FAILED
          example: OK
        message:
          type: string
          description: Error message; empty string if successful.
          example: ''
        fromZoneName:
          type: string
          description: IANA timezone name of the origin timezone.
          example: America/Los_Angeles
        fromAbbreviation:
          type: string
          description: Timezone abbreviation of the origin timezone.
          example: PDT
        fromTimestamp:
          type: integer
          format: int64
          description: Unix timestamp of the origin time.
          example: 1464793200
        toZoneName:
          type: string
          description: IANA timezone name of the destination timezone.
          example: Australia/Sydney
        toAbbreviation:
          type: string
          description: Timezone abbreviation of the destination timezone.
          example: AEST
        toTimestamp:
          type: integer
          format: int64
          description: Unix timestamp of the equivalent time in the destination timezone.
          example: 1464854400
        offset:
          type: integer
          description: Difference in seconds between origin and destination timezone.
          example: 61200
  examples:
    ConvertTimeZoneLAToSydney:
      summary: Convert from Los Angeles to Sydney
      value:
        status: OK
        message: ''
        fromZoneName: America/Los_Angeles
        fromAbbreviation: PDT
        fromTimestamp: 1464793200
        toZoneName: Australia/Sydney
        toAbbreviation: AEST
        toTimestamp: 1464854400
        offset: 61200
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key obtained from https://timezonedb.com/register
externalDocs:
  description: TimezoneDB API Documentation
  url: https://timezonedb.com/api