-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
Feature Request: Add timezone-aware local time to CONTEXT ENTRY #10071
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, the CONTEXT ENTRY provides time in UTC format:
Current time: 2026-02-06T02:51:44Z
For users in non-UTC timezones (e.g., Asia/Shanghai GMT+8), this requires manual timezone conversion, which is error-prone and can lead to confusion - especially for sub-agents spawned via sessions_spawn.
Proposed Solution
Add a timezone-aware local time field to CONTEXT ENTRY, based on the configured timezone in the system prompt:
Current time: 2026-02-06T02:51:44Z (UTC)
Local time: 2026-02-06 10:51:44 (Asia/Shanghai, GMT+8)
Or alternatively, make the timezone configurable and provide local time directly:
Current time: 2026-02-06 10:51:44 (Asia/Shanghai, GMT+8)
Benefits
- Reduces cognitive load for agents
- Prevents timezone conversion errors
- Improves consistency across main sessions and sub-agents
- Makes time-based logic more reliable
Workaround
Currently using date command execution at session start, but this doesn't fully solve the problem for sub-agents or when time context is needed mid-session.
Context
- Runtime timezone:
Asia/Shanghai - Affected: Main sessions and sub-agents spawned via
sessions_spawn
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.