diff --git a/API/MangaDownloadClients/DownloadClient.cs b/API/MangaDownloadClients/DownloadClient.cs index d4f5741..0df3f51 100644 --- a/API/MangaDownloadClients/DownloadClient.cs +++ b/API/MangaDownloadClients/DownloadClient.cs @@ -31,11 +31,11 @@ public abstract class DownloadClient // Apply the delay TimeSpan timeBetweenRequests = TimeSpan.FromMinutes(1).Divide(rateLimit); - DateTime now = DateTime.Now; + DateTime now = DateTime.UtcNow; LastExecutedRateLimit.TryAdd(requestType, now.Subtract(timeBetweenRequests)); TimeSpan rateLimitTimeout = timeBetweenRequests.Subtract(now.Subtract(LastExecutedRateLimit[requestType])); - Log.Debug($"Request limit {requestType} {rateLimit}/Minute timeBetweenRequests: {timeBetweenRequests:ss'.'fffff} Timeout: {rateLimitTimeout:ss'.'fffff}"); + Log.Debug($"Request limit {requestType} {rateLimit}/Minute timeBetweenRequests: {timeBetweenRequests:ss'.'fffff}"); if (rateLimitTimeout > TimeSpan.Zero) {