Current Datetime
Inject the current date and time into each request so the LLM has accurate temporal context.
Current Datetime injects the current date and time into each request before it is forwarded to the LLM. This gives the model reliable temporal context for queries that depend on knowing the current date or time — for example: "What happened today?", "How many business days are left this month?", or "What should I schedule for tomorrow?"
Without this module, LLMs have no knowledge of the current date beyond their training cutoff, often producing incorrect or vague temporal answers.
Stage
| Stage | Behavior |
|---|---|
| PRE only | Prepends a datetime block to the first user message in the request before forwarding to the LLM |
Injected Format
The module prepends the following block to the first user message in the request:
Current datetime: {datetime}
Timezone: {timezone}If no user message exists in the request, the block is prepended to the first message of any role.
Example
Original first user message:
How many days until the end of the quarter?After injection (timezone: Asia/Jakarta, format: ISO 8601):
Current datetime: 2026-06-25T09:30:00+07:00
Timezone: Asia/Jakarta
How many days until the end of the quarter?Configuration
Timezone
The IANA timezone identifier used to resolve the current datetime. Defaults to UTC.
All standard IANA timezone identifiers are supported. If an unknown or invalid timezone is provided, the module automatically falls back to UTC.
Common options:
| Region | Value |
|---|---|
| UTC | UTC |
| Jakarta / Bangkok / Ho Chi Minh | Asia/Jakarta |
| Singapore / Kuala Lumpur | Asia/Singapore |
| Tokyo | Asia/Tokyo |
| London | Europe/London |
| New York | America/New_York |
| Los Angeles | America/Los_Angeles |
Datetime Format
The output format for the injected datetime string.
| Option | Example Output |
|---|---|
| ISO 8601 (default) | 2026-06-18T21:30:00+07:00 |
| Date only | 2026-06-18 |
| Date & time | 2026-06-18 21:30:00 |
| Human readable | June 18, 2026 21:30 WIB |
| Unix timestamp | 1781814600 |
Example Use Cases
- Time-sensitive Q&A bots: Chatbots that answer questions like "What's today?" or "When does this promotion end?" need reliable temporal context.
- Scheduling assistants: Agents that help users book meetings, set reminders, or reason about deadlines.
- Daily digest generation: Pipelines that generate summaries anchored to the current date.
- Business logic validation: LLMs evaluating time-based rules (e.g., "Is this invoice still within the payment window?").
No system prompt required
This module injects the datetime at the infrastructure level, so you don't need to add a timestamp to your system prompt in every application. Changes to the timezone or format take effect immediately without any code changes.