refactor(time): change DateTime from UTC to local time

- Change HealthCheckHtmlGenerator to use DateTime.Now instead of DateTime.UtcNow
- Change ProfileWorker health check timestamps to use DateTime.Now
- Change Program health check endpoint to use DateTime.Now
- Ensures consistent local time usage across the application
This commit is contained in:
2026-08-04 16:34:16 +02:00
parent 5b865c0442
commit 5b67035a07
3 changed files with 9 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ public class ProfileWorker(
await work.ExecuteAsync(stoppingToken);
// Success - update health state
_lastSuccessfulRun = DateTime.UtcNow;
_lastSuccessfulRun = DateTime.Now;
_consecutiveFailures = 0;
_lastException = null;
@@ -151,7 +151,7 @@ public class ProfileWorker(
));
}
var timeSinceLastSuccess = DateTime.UtcNow - _lastSuccessfulRun.Value;
var timeSinceLastSuccess = DateTime.Now - _lastSuccessfulRun.Value;
// Adaptive multiplier: 3x for fast intervals (<10s), 1.5x for slower intervals
// This ensures faster problem detection when using longer intervals (e.g., 60s)