Skip to content

Feature Request: Add timezone-aware local time to CONTEXT ENTRY #10071

@OliverYuGit

Description

@OliverYuGit

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

  1. Reduces cognitive load for agents
  2. Prevents timezone conversion errors
  3. Improves consistency across main sessions and sub-agents
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions