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
-1200to+1200. Examples:https://aisenseapi.com/services/v1/datetime/+0100https://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:
- Send a
GETrequest to the endpoint URL. - Optionally include a timezone offset in the URI (e.g.,
for UTC+1 or0100for UTC+1 or +0100-0530for UTC-5:30). - 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/+0200Response: 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/0200Response: json
{ "datetime": "2025-01-27T16:53:22+02:00" }
-
Request with a timezone offset:
https://aisenseapi.com/services/v1/datetime/-0200Response: json
{ "datetime": "2025-01-27T12:53:22+02:00" } -
Request without a timezone offset:
https://aisenseapi.com/services/v1/datetimeResponse: json
{ "datetime": "2025-01-27T14:53:22+00:00" }