Auto-reply: include weekday in envelope timestamps#12438
Merged
Conversation
Comment on lines
8
to
+18
| export function formatEnvelopeTimestamp(date: Date, zone: EnvelopeTimestampZone = "utc"): string { | ||
| const normalized = zone.trim().toLowerCase(); | ||
| const weekday = (() => { | ||
| try { | ||
| if (normalized === "utc" || normalized === "gmt") { | ||
| return new Intl.DateTimeFormat("en-US", { timeZone: "UTC", weekday: "short" }).format(date); | ||
| } | ||
| if (normalized === "local" || normalized === "host") { | ||
| return new Intl.DateTimeFormat("en-US", { weekday: "short" }).format(date); | ||
| } | ||
| return new Intl.DateTimeFormat("en-US", { timeZone: zone, weekday: "short" }).format(date); |
Contributor
There was a problem hiding this comment.
Whitespace timezone crash
formatEnvelopeTimestamp() normalizes zone with trim()/toLowerCase(), but still passes the original (untrimmed) zone into Intl.DateTimeFormat({ timeZone: zone }) and later formatZonedTimestamp(date, { timeZone: zone }). If a caller provides a padded timezone like " America/Los_Angeles ", formatZonedTimestamp throws RangeError: invalid time zone (it doesn’t catch Intl exceptions), so this helper can crash tests. Use the trimmed timezone string when passing timeZone to Intl/formatZonedTimestamp (or wrap the zoned formatting call in a try/catch similarly to the weekday formatter).
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/helpers/envelope-timestamp.ts
Line: 8:18
Comment:
**Whitespace timezone crash**
`formatEnvelopeTimestamp()` normalizes `zone` with `trim()`/`toLowerCase()`, but still passes the original (untrimmed) `zone` into `Intl.DateTimeFormat({ timeZone: zone })` and later `formatZonedTimestamp(date, { timeZone: zone })`. If a caller provides a padded timezone like `" America/Los_Angeles "`, `formatZonedTimestamp` throws `RangeError: invalid time zone` (it doesn’t catch Intl exceptions), so this helper can crash tests. Use the trimmed timezone string when passing `timeZone` to Intl/formatZonedTimestamp (or wrap the zoned formatting call in a try/catch similarly to the weekday formatter).
How can I resolve this? If you propose a fix, please make it concise.
yeboster
pushed a commit
to yeboster/openclaw
that referenced
this pull request
Feb 9, 2026
chrisbrittan
added a commit
to chrisbrittan/Moltbot-Voice
that referenced
this pull request
Feb 9, 2026
Conflicts resolved: - src/auto-reply/envelope.ts: took upstream (centralized format-time utils) - test/helpers/envelope-timestamp.ts: took upstream (same reason) Our weekday-in-timestamps feature was independently implemented upstream in openclaw#12438 with a better architecture (shared format-time modules). Fix TS2352 cast in session-transcript-repair.ts (AssistantMessage type change). Co-Authored-By: Claude Opus 4.6 <[email protected]>
NikolasP98
pushed a commit
to NikolasP98/openclaw
that referenced
this pull request
Feb 9, 2026
NikolasP98
added a commit
to NikolasP98/openclaw
that referenced
this pull request
Feb 9, 2026
Integrated upstream improvements: - CRITICAL: Fix bundled hooks broken since 2026.2.2 (openclaw#9295) - Grok web search provider (xAI) with inline citations - Telegram video note support with tests and docs - QMD model cache sharing optimization (openclaw#12114) - Context overflow false positive fix (openclaw#2078) - Model failover 400 status handling (openclaw#1879) - Dynamic config loading per-message (openclaw#11372) - Gateway post-compaction amnesia fix (openclaw#12283) - Skills watcher: ignore Python venvs and caches - Telegram send recovery from stale thread IDs - Cron job parameter recovery (openclaw#12124) - Auto-reply weekday timestamps (openclaw#12438) - Utility consolidation refactoring (PNG, JSON, errors) - Cross-platform test normalization (openclaw#12212) - macOS Nix defaults support (openclaw#12205) Preserved DEV enhancements: - Docker multi-stage build with enhanced tooling (gh, gog, obsidian-cli, uv, nano-pdf, mcporter, qmd) - Comprehensive .env.example documentation (371 lines) - Multi-environment docker-compose support (DEV/PRD) - GOG/Tailscale integration - Fork-sync and openclaw-docs skills - UI config editor (Svelte) - Fork workflow documentation Merge strategy: Cherry-picked 22 upstream commits, preserved DEV Docker architecture. Docker files unchanged: Dockerfile, docker-compose.yml, docker-setup.sh, .env.example Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Ethermious
pushed a commit
to Ethermious/openclaw
that referenced
this pull request
Feb 9, 2026
lucasmpramos
pushed a commit
to butley/openclaw
that referenced
this pull request
Feb 10, 2026
slathrop
referenced
this pull request
in slathrop/openclaw-js
Feb 11, 2026
Tasks completed: 2/2 - Port weekday in envelope timestamps (#12438) - Port timezone trim fix (#12446) SUMMARY: .planning/phases/16-gateway-cron-ios/16-03-SUMMARY.md
yeboster
pushed a commit
to yeboster/openclaw
that referenced
this pull request
Feb 13, 2026
skyhawk14
pushed a commit
to skyhawk14/openclaw
that referenced
this pull request
Feb 13, 2026
mbelinky
added a commit
that referenced
this pull request
Feb 14, 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.
Problem
Fix
Testing
Greptile Overview
Greptile Summary
This PR changes auto-reply envelope timestamp formatting to prefix absolute timestamps with a short weekday (Mon/Tue/…) in the same timezone as the existing timestamp, so models don’t need to derive day-of-week from the date. It updates unit tests and the test timestamp helper to match the new envelope format.
Confidence Score: 4/5
zonewhen calling Intl/formatZonedTimestamp despite trimming for normalization.