← Back to PRs

#7919: feat: implement timezone support for console timestamps and add verification script

by southpy open 2026-02-03 10:08 View on GitHub →
stale size: M
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates console and subsystem “pretty” timestamp formatting to respect the `TZ` environment variable by using `Intl.DateTimeFormat(..., { timeZone })`, and adds regression tests to validate timezone-dependent output. It also adds a small verification script intended for manual validation. Key code changes are in `src/logging/console.ts` (console capture timestamp prefix) and `src/logging/subsystem.ts` (subsystem logger console line formatting), with new tests covering Asia/Shanghai and America/New_York offsets. <h3>Confidence Score: 4/5</h3> - This PR is generally safe to merge; changes are localized to timestamp formatting with test coverage. - Core behavior changes are small and covered by new tests, but there are a couple of quality issues: the new verification script reports success unconditionally, and the new/updated tests enable fake timers after constructing Date instances, which can cause flakiness in some environments. - verify-timezone-fix.mjs, src/logging/console-timestamp-tz.test.ts (and related tests) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs