MoonshotAI / MoonshotAI/kimi-code

Session system prompt injects UTC timestamp — model announces wrong local time for UTC+8 users

Open
#3,330 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

The session system prompt contains a line like:

The current date and time in ISO format is 2026-08-25T14:56:54.235Z.

This is UTC (Z suffix). In China (UTC+8) the model reads this value and announces times that are 8 hours off — e.g. telling the user "it is now 05:41, pre-market" when local time is 13:41.

Why this bites Windows users hardest

  • On macOS/Linux, date and the TZ database usually agree with the user's locale, so the model can self-correct by checking the environment.
  • On Windows + Git Bash there is no zoneinfo database, so TZ="Asia/Shanghai" date silently falls back to UTC — the model's most natural cross-check returns the same wrong answer, reinforcing the error.

Suggestion

Inject the user's local time with an explicit offset (e.g. 2026-08-28T13:41:00+08:00) instead of, or in addition to, the UTC timestamp. Alternatively state explicitly in the prompt that the timestamp is UTC and local conversion is required.

Impact

Any workflow where the model reports the current time (trading sessions, scheduling, reminders) silently produces wrong times for all non-UTC users. For a non-technical user this reads as "the product's clock is broken".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the session system-prompt construction and timestamp-generation entry points for the UTC ISO timestamp shown in the issue. Check existing tests and reproduce the behavior on Windows/Git Bash if available. Done means the prompt preserves an unambiguous UTC/local-time interpretation or includes the user's explicit offset, with coverage for non-UTC users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.