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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user