LibreChat/packages/api
Lionel Ringenbach 736960e0a4 🕐 fix: Use client timezone for special variable date formatting
`replaceSpecialVars` uses `dayjs()` which defaults to the server's
timezone (UTC in Docker), causing `{{current_datetime}}` and
`{{current_date}}` to always show +00:00 regardless of the user's
location. This is inconsistent with `append_current_datetime` for
assistants which already handles client timezone via `clientTimestamp`.

Add dayjs timezone plugin support and a `timezone` parameter to
`replaceSpecialVars`. The client sends its IANA timezone string
(`Intl.DateTimeFormat().resolvedOptions().timeZone`) alongside the
existing `clientTimestamp`, and the agent initialization flow passes
it through to produce timezone-aware date formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 00:02:26 -07:00
..
src 🕐 fix: Use client timezone for special variable date formatting 2026-03-27 00:02:26 -07:00
.gitignore 🧠 feat: User Memories for Conversational Context (#7760) 2025-06-07 18:52:22 -04:00
babel.config.cjs 🧠 feat: User Memories for Conversational Context (#7760) 2025-06-07 18:52:22 -04:00
jest.config.mjs 🛂 fix: MCP OAuth Race Conditions, CSRF Fallback, and Token Expiry Handling (#12171) 2026-03-10 21:15:01 -04:00
package.json ⚗️ feat: Agent Context Compaction/Summarization (#12287) 2026-03-21 14:28:56 -04:00
rollup.config.js 🔄 refactor: Migrate Cache Logic to TypeScript (#9771) 2025-10-02 09:33:58 -04:00
tsconfig-paths-bootstrap.mjs 🧠 feat: User Memories for Conversational Context (#7760) 2025-06-07 18:52:22 -04:00
tsconfig.build.json 🧑‍💻 refactor: Secure Field Selection for 2FA & API Build Sourcemap (#9087) 2025-08-15 18:55:49 -04:00
tsconfig.json 🌊 feat: Resumable LLM Streams with Horizontal Scaling (#10926) 2025-12-19 12:14:19 -05:00
tsconfig.spec.json 🧠 feat: User Memories for Conversational Context (#7760) 2025-06-07 18:52:22 -04:00