Skip to content

Set default timezone in metrics command based on system settings#21

Merged
itssimon merged 2 commits into
mainfrom
dev-108-set-timezone-for-metrics-command-based-on-tz-in-users-shell
Apr 16, 2026
Merged

Set default timezone in metrics command based on system settings#21
itssimon merged 2 commits into
mainfrom
dev-108-set-timezone-for-metrics-command-based-on-tz-in-users-shell

Conversation

@itssimon
Copy link
Copy Markdown
Member

@itssimon itssimon commented Apr 16, 2026

Summary by cubic

Default to the system timezone for the metrics command when --timezone is not provided (implements DEV-108). Interval grouping and since/until parsing now use the user’s local time, with a UTC fallback.

  • New Features
    • Auto-detect timezone from the OS using iana-time-zone; fallback to UTC if detection fails. Updated CLI help and commands.md to note the new default.
    • Improved test to verify the default timezone is sent when not provided (uses a fixed zone for determinism).

Written for commit bc1a48f. Summary will update on new commits.

@itssimon itssimon self-assigned this Apr 16, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.31%. Comparing base (b68363e) to head (bc1a48f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   91.26%   91.31%   +0.05%     
==========================================
  Files          12       12              
  Lines        1934     1935       +1     
==========================================
+ Hits         1765     1767       +2     
+ Misses        169      168       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/metrics.rs">

<violation number="1" location="src/metrics.rs:82">
P2: According to linked Linear issue DEV-108, the default timezone should come from the user's shell `TZ`, but this fallback uses the OS system timezone and can ignore `TZ` overrides.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread src/metrics.rs
@itssimon itssimon merged commit 0fa2953 into main Apr 16, 2026
6 checks passed
@itssimon itssimon deleted the dev-108-set-timezone-for-metrics-command-based-on-tz-in-users-shell branch April 16, 2026 01:51
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