DEV Community

shaheen amjed
shaheen amjed

Posted on

Needs a professional time zone Date and Time converter ?

Convert any date and time from one timezone to another instantly. Simple, accurate, and perfect for developers, bots, or scheduling tools.
link: https://rapidapi.com/dreamers-dev-dreamers-dev-default/api/timezone-converter-api1

πŸ“˜ API Name: Timezone Converter API

πŸ“ Description:

> Convert any date and time from one timezone to another instantly. Simple, accurate, and perfect for developers, bots, or scheduling tools.


πŸ“š Endpoint Documentation

▢️ POST /convert

Description:

Convert a given datetime from one timezone to another using IANA timezone names.

Request Payload:

{
  "datetime": "2025-07-02T15:30:00",
  "fromTimezone": "Asia/Riyadh",
  "toTimezone": "America/New_York"
}
Enter fullscreen mode Exit fullscreen mode
Field Type Required Description
datetime string βœ… yes ISO 8601 datetime string
fromTimezone string βœ… yes IANA timezone of the source (e.g. Asia/Riyadh)
toTimezone string βœ… yes IANA timezone of the target (e.g. America/New_York)

βœ… Response Example:

{
  "convertedTime": "2025-07-02T08:30:00-04:00",
  "fromOffset": "+03:00",
  "toOffset": "-04:00",
  "timeDifference": "-7 hours",
  "dayOfWeek": "Wednesday"
}
Enter fullscreen mode Exit fullscreen mode
Field Type Description
convertedTime string ISO 8601 string of the converted datetime in target zone
fromOffset string UTC offset of the source timezone
toOffset string UTC offset of the target timezone
timeDifference string Human-readable difference between timezones
dayOfWeek string Day name (e.g. Monday, Wednesday)

⚠️ Error Response Example:

{
  "error": "Invalid input",
  "message": "Field 'datetime' is required and must be a valid ISO 8601 string"
}
Enter fullscreen mode Exit fullscreen mode

πŸ’‘ Bonus Endpoint: GET /health

Returns:

{
  "status": "healthy",
  "uptime": "1253 seconds",
  "timestamp": "2025-07-02T20:15:22Z"
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)