World Clock

FREEMIUM
By carter383 | Updated a month ago | Tools
Popularity

8.6 / 10

Latency

417ms

Service Level

95%

Health Check

100%

README

Welcome to the World Clock API documentation! Our API is a powerful and intuitive service designed to meet all your timekeeping requirements across the globe with unmatched accuracy and ease. It offers two core features that can be effortlessly incorporated into your projects:

  1. Current Time Retrieval: Fetch the current time of any nation by supplying the relevant ISO 3166 country code. Ideal for applications that require live time display, or for anyone needing to stay in sync with events or meetings around the world.

  2. Relative Time Calculation: Elevate your time management with the capability to determine the time difference between a given time in one country and the current time in another, all through ISO 3166 country codes. This functionality is perfect for organizing activities across time zones, event planning, or simply for understanding the time gap between different regions.

Highlighted Features:

  • Worldwide Reach: Utilize time information from across the globe via ISO 3166 country codes.
  • Accuracy and Dependability: Depend on our precise and current time zone data for accurate time information anywhere, anytime.
  • User-Friendly Design: Our API is crafted for simplicity, ensuring a smooth integration process with clear request and response formats.
  • Diverse Use Cases: Ideal for developers creating travel applications, scheduling platforms, or any tool that necessitates reliable time data from various locations.

Getting Started:

  • Fetching Current Time: To get the current time for a specific country, send a request with that countryโ€™s ISO code. The API responds with the current time in a universally understood format.
  • Calculating Relative Time: For relative time inquiries, input the reference time and ISO code of the originating country, along with the target countryโ€™s ISO code. Our API calculates and returns the time difference for the desired location.

Dive into global time integration with our World Clock API today and enhance your applicationsโ€™ connectivity and relevance.


get_relative_time_by_country_code Python Example

import requests

url = "https://world-clock3.p.rapidapi.com/Get_Relative_Time"

querystring = {"OriginCountryCode":"GB","OriginTime":"2024-03-26 10:57:23","TargetCountryCode":"FR"}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "world-clock3.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.text())

Example Response:

"2024-03-26 11:57:23"

get_current_time_by_country_code Python Example

import requests

url = "https://world-clock3.p.rapidapi.com/Get_Current_Time"

querystring = {"CountryCode":"GB"}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "world-clock3.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.text())

Example Response:

"2024-03-26 11:00:33"

This revision offers a streamlined and structured overview of your World Clock API, making it easier for developers to understand and implement the features in their applications.

Followers: 0
API Creator:
Rapid account: Carter 383
carter383
carter383
Log In to Rate API
Rating: 5 - Votes: 1