Skip to content

fix: log warning on timezone fallback - #35

Open
PeterKruithof wants to merge 1 commit into
masterfrom
fix/timezone-fallback-logging
Open

fix: log warning on timezone fallback#35
PeterKruithof wants to merge 1 commit into
masterfrom
fix/timezone-fallback-logging

Conversation

@PeterKruithof

Copy link
Copy Markdown
Collaborator

Summary

  • Change GetTimeZone from static to instance method to access _loggercloses Invalid timezone on allowance silently falls back to UTC #16
  • Log LogWarning with the invalid timezone ID and exception before falling back to UTC
  • Add test verifying invalid timezone doesn't throw and allowance still processes

Test plan

  • dotnet build — 0 errors
  • dotnet test — 161 tests pass (1 new)
  • Verify log output contains timezone warning when invalid ID is used

🤖 Generated with Claude Code

Changed GetTimeZone from static to instance method so it can access
_logger. Invalid timezone IDs now log a warning before falling back to UTC.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧬 Mutation Testing

Metric Value
Score 54.72% 📈 (+6.77% vs baseline)
Killed 347
Survived 163
No Coverage 125
Timeout 1
What does this mean?

Stryker mutates your code (flips conditions, removes lines, changes values) and runs tests against each mutation. Killed = tests caught it (good). Survived = tests missed it (weak spot). No Coverage = no test touches this code.

Download the full HTML report from the Artifacts section below for per-file details.

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.

Invalid timezone on allowance silently falls back to UTC

1 participant