You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adopt TimeProvider instead of DateTime.UtcNow for testable time handling #1601
The codebase reads DateTime.UtcNow / DateTimeOffset.UtcNow directly in several places, which makes time-dependent behavior (expiry, retention, timestamps) hard to test deterministically.
Proposal: register TimeProvider.System in DI, inject TimeProvider where time is read, and use FakeTimeProvider (Microsoft.Extensions.TimeProvider.Testing) in tests.
Surfaced while reviewing #1267 (reading time tracker).
Activity