feat(timezone): make timestamps timezone-configurable#129
Merged
Maxwell-Code07 merged 1 commit intoJun 4, 2026
Conversation
…able Add top-level `timezone` config option (default: "system") supporting IANA names and UTC offset strings (ECMA-402 2024). - Introduce unified `src/utils/time.ts` module with formatForLLM, formatLocalDate, formatLocalDateTime, startOfLocalDay, nowInstantISO - Converge 4 scattered time helpers into the single module - L1 extraction / auto-recall / scene-extraction / persona-generation prompts now emit ISO 8601 with explicit UTC offset - Add timezone declaration to LLM system prompts - Local-day shard boundaries and cleaner cutoff follow configured tz - Storage instants (SQLite/TCVDB) remain UTC — no data migration needed - 38 unit tests covering IANA, offset, DST, half-hour zones, fallback
Collaborator
This was referenced Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description | 描述
Add a top-level
timezoneconfig option (default:"system") that controls all user/LLM-facing timestamp formatting.Asia/Shanghai,Europe/Berlin) and UTC offset strings (+08:00,-05:30) per ECMA-402 2024.src/utils/time.tsmodule, converging 4 scattered time helpers."system"= zero-config upgrade, fully backward-compatible.Related Issue | 关联 Issue
Closes #75
Closes #87
Supersedes #76
Change Type | 修改类型
Self-test Checklist | 自测清单
Additional Notes | 其他说明
cc @southpy @Elvisvon @YOMXXX @Maxwell-Code07
This PR builds on the direction explored in #76 by @YOMXXX — we adopted the same link-path coverage (capture/L1/L2/recall) but switched from integer
timezoneOffsetMinutesto IANA timezone names for DST correctness. Thank you for the groundwork!Scope exclusion: The
offloadmodule (src/offload/time-utils.ts) is intentionally unchanged in this PR.