Function
Tool identifierdatetime.
datetime provides timezone-aware date and time operations: getting the current time, parsing common date/time strings, formatting output, converting between timezones, computing the difference between two timestamps, and adding or subtracting durations. All computation is local and accesses no external services.
Import path: from veadk.tools.builtin_tools.datetime_tool import datetime
Prerequisites
Environment variables:MODEL_AGENT_API_KEY: API key for the agent’s reasoning model (thedatetimetool itself needs no extra credentials and accesses no external services)
Usage
examples/tools/datetime/agent.py
Parameters
Action behavior and returned fields:
Success returns a dictionary with the fields above; invalid parameters return
{"error": ...}.
Notes
- ISO 8601 strings are supported (including the trailing
ZorzUTC notation), along withYYYY-MM-DD,YYYY-MM-DD HH:MM:SS,YYYY/MM/DD, andYYYY/MM/DD HH:MM:SS. timestampis Unix time in seconds;weekdayranges frommondaytosunday; fordiff,humangives a readable duration in days plusHH:MM:SS, with a minus sign whenvalue2is earlier thanvalue.- Timezones use IANA names, so the runtime must provide the timezone database; containers or minimal systems lacking timezone data need the system
tzdatapackage installed.