Files
agent_delta/backend/app/agents/tools/datetime_tool.py
T
2026-06-15 14:22:07 +08:00

14 lines
359 B
Python

"""Date and time utilities for agents."""
from datetime import UTC, datetime
def get_current_datetime() -> dict[str, str]:
"""Get the current date and time (UTC)."""
now = datetime.now(UTC)
return {
"date": now.strftime("%Y-%m-%d"),
"time": now.strftime("%H:%M:%S"),
"datetime": now.strftime("%Y-%m-%d %H:%M:%S"),
}