get_current_datetime
Retrieve current date and time with ISO or custom formats for timestamping logs, files, and migrations. Choose local or remote provider for accuracy.
Instructions
Get the current date and time with optional formatting and provider selection. Essential for creating timestamped files, logs, database migrations, and any time-sensitive development tasks. Supports ISO format (default) and custom formats using tokens like YYYY, MM, DD, HH, mm, ss, SSS.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Date format: "iso" for ISO 8601 (default), or custom format using tokens (YYYY, MM, DD, HH, mm, ss, SSS). Common examples: "iso", "YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY", "YYYY-MM-DD-HHmmss" | iso |
| provider | No | DateTime provider: "local" for system clock (default), "remote" for network time service | local |