← All tool references

Productivity · execute

Current Time

Show the current time and Unix timestamp for a selected IANA time zone.

Open public tool

Overview

Category
Productivity
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/current-time

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/current-time/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

timezone · string · optional
Enter an IANA time-zone name, such as America/Chicago or Europe/Paris.
format · string · required
Choose the date or time representation you want copied from the result. Accepted values: iso, locale, unix.
{
    "type": "object",
    "properties": {
        "timezone": {
            "type": "string",
            "description": "Enter an IANA time-zone name, such as America/Chicago or Europe/Paris."
        },
        "format": {
            "type": "string",
            "enum": [
                "iso",
                "locale",
                "unix"
            ],
            "description": "Choose the date or time representation you want copied from the result."
        }
    },
    "required": [
        "format"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

current_time · string
Browser-calculated current time.
timezone · string
Browser-calculated timezone.
{
    "type": "object",
    "properties": {
        "current_time": {
            "type": "string",
            "description": "Browser-calculated current time."
        },
        "timezone": {
            "type": "string",
            "description": "Browser-calculated timezone."
        }
    },
    "additionalProperties": false
}

Current Time: UTC ISO

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/current-time/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "timezone": "UTC",
    "format": "iso"
}'
{
    "ok": true,
    "data": {
        "slug": "current-time",
        "result": {
            "values": {
                "current_time": "12:00:00 PM",
                "timezone": "UTC"
            },
            "display": {
                "display": "12:00:00 PM"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.