Skip to content

fix: honor APP_TIMEZONE for date-sensitive operations#157

Merged
jordanpartridge merged 1 commit into
masterfrom
fix/app-timezone
Jul 3, 2026
Merged

fix: honor APP_TIMEZONE for date-sensitive operations#157
jordanpartridge merged 1 commit into
masterfrom
fix/app-timezone

Conversation

@jordanpartridge

Copy link
Copy Markdown
Contributor

The bug

config/app.php had no timezone key, so Carbon::today() / yesterday() always ran in UTC. On odin the nightly 23:00 MST synthesis cron generated digests dated tomorrow and the digest recency window skewed 7 hours.

The fix

One config key: 'timezone' => env('APP_TIMEZONE', 'UTC'). Default unchanged (UTC) — opt-in per deployment.

Verification

Live on odin with APP_TIMEZONE=America/Phoenix: synthesize --digest --dry-run at 21:45 MST now reports Generating digest for 2026-07-02 (was 2026-07-03). Synthesize test suite: 15/15 passing (tests pin Carbon::setTestNow, unaffected by the default).

config/app.php had no timezone key, so the framework always ran in UTC.
Daily digests generated by an evening cron were dated tomorrow and the
24-hour recency window skewed by the UTC offset. Defaults to UTC when
APP_TIMEZONE is unset — no behavior change for existing installs.

@lexi-chief-of-staff lexi-chief-of-staff Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it.

  • Single targeted addition of 'timezone' => env('APP_TIMEZONE', 'UTC') after name; matches Laravel convention and leaves default unchanged.
  • No key collisions or ordering issues in the minimal config/app.php.
  • PR body and verification (synthesize --digest --dry-run) confirm the exact behavior change needed for odin nightlies.
  • Test suite unaffected per author note (Carbon::setTestNow).

@jordanpartridge jordanpartridge merged commit 46f1df6 into master Jul 3, 2026
1 check failed
@jordanpartridge jordanpartridge deleted the fix/app-timezone branch July 3, 2026 04:43
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

📊 Coverage Report

Metric Coverage Threshold Status
Lines 100% 95%

Files Below Threshold

File Coverage Uncovered Lines
app/Enums/ObservationType.php 0% None
app/Exceptions/Qdrant/QdrantException.php 0% None
app/Mcp/Servers/KnowledgeServer.php 0% None
app/Services/AgentHealthService.php 0% None

🏆 Synapse Sentinel Gate

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🔧 Synapse Sentinel: 1 check need attention

The following issues must be resolved before this PR can be merged:


Security Audit


Review the output and fix any issues.

Quick Reference:

  • PHPStan errors → Fix type mismatches first, then missing types
  • Test failures → Read the assertion message, trace expected vs actual
  • Style issues → Run composer format to auto-fix

🤖 Generated by Synapse Sentinel - View Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant