Datetime API Endpoint - Free Public API

Endpoint URL:
https://aisenseapi.com/services/v1/datetime

Description:
This endpoint returns the current date and time in ISO 8601 format, adjusted for an optional timezone offset. The timezone offset can be provided as part of the request URI. If no valid timezone offset is provided, the response defaults to UTC.

Response Format:

  • Content-Type: application/json
  • Example Success Response: json
    { "datetime": "2025-01-27T14:53:22+00:00" }

Input Requirements:

  • The timezone offset can be provided in the URI as a four-digit value in the range -1200 to +1200. Examples:
    • https://aisenseapi.com/services/v1/datetime/+0100
    • https://aisenseapi.com/services/v1/datetime/-0530

Use Cases:

  • Retrieving the current date and time adjusted for specific timezones.
  • Applications requiring ISO 8601 formatted timestamps.
  • Scheduling or logging events with timezone-aware timestamps.

How to Use:

  1. Send a GET request to the endpoint URL.
  2. Optionally include a timezone offset in the URI (e.g., 0100 for UTC+1 or +0100 for UTC+1 or -0530 for UTC-5:30).
  3. If no offset is provided or the offset is invalid, the response defaults to UTC.

Examples:

  • Request with a timezone offset:

    https://aisenseapi.com/services/v1/datetime/+0200

    Response: json

    { "datetime": "2025-01-27T16:53:22+02:00" }
  • Request with a timezone offset (alias for the one above):

    https://aisenseapi.com/services/v1/datetime/0200

    Response: json

    { "datetime": "2025-01-27T16:53:22+02:00" }
  • Request with a timezone offset:

    https://aisenseapi.com/services/v1/datetime/-0200

    Response: json

    { "datetime": "2025-01-27T12:53:22+02:00" }

  • Request without a timezone offset:

    https://aisenseapi.com/services/v1/datetime

    Response: json

    { "datetime": "2025-01-27T14:53:22+00:00" }

Scroll to Top