Repository navigation
test: explicitly use UTC timezone in tests - #1343
Conversation
|
no API key found — this repo is configured to use To fix: add the key as a GitHub Actions secret (referenced from your workflow's Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo unit tests are updated to supply an explicit ChangesDeterministic timezone in tests
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
|
@coderabbitai review it |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get the PR diff
gh pr view 1343 --repo ccusage/ccusage --json title,body,files,additions,deletions,commits
echo "---DIFF---"
gh pr diff 1343 --repo ccusage/ccusageLength of output: 5160 🏁 Script executed: #!/bin/bash
# Check if snapshot files exist and whether they were changed in this PR
fd -e snap . rust/ | head -30
echo "---"
# Check git diff for snapshot files
gh pr diff 1343 --repo ccusage/ccusage -- "*.snap" 2>/dev/null | head -100Length of output: 3092 🏁 Script executed: #!/bin/bash
# Check the relevant snapshot files
cat rust/crates/ccusage/src/adapter/opencode/snapshots/ccusage__adapter__opencode__parser__tests__snapshots_message_to_entry_variants_and_model_candidates.snap
echo "=== main.rs codex snapshot ==="
# Find snapshot for builds_codex_daily_json_report
fd -e snap . rust/crates/ccusage/src/ | xargs grep -l "builds_codex" 2>/dev/null
# Check the parse_tz function
rg -n "fn parse_tz" rust/Length of output: 3003 🏁 Script executed: #!/bin/bash
# Check parse_tz implementation
sed -n '215,240p' rust/crates/ccusage/src/date_utils.rs
echo "==="
# Check the builds_codex_daily_json_report test in main.rs
rg -n "builds_codex_daily_json_report" rust/ -A 50 | head -60Length of output: 5144
Review Summary ✅The root cause is clear:
|
|
Historical audit: this pull request was auto-closed by the legacy contributor gate. That closure did not assess technical importance. Audit result: resolved. A later merged change or the current |

I was running tests locally (PDT) and they failed since they didn't explicitly use UTC. This fixes the tests that failed for me.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Make tests explicitly use UTC to prevent timezone-dependent failures on local runs. Pass UTC to the parser and report generation tests so results are deterministic across environments.
Written for commit d3449fe. Summary will update on new commits.
Summary by CodeRabbit