fix: use DateTime.Now instead of UtcNow in ExpirePendingOrdersService
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m33s

Database stores Created timestamps using DateTime.Now (local time).
Background service was comparing with DateTime.UtcNow causing 3.5 hour offset (Iran timezone).
Orders would only expire after ~4 hours instead of 30 minutes.
This commit is contained in:
masoodafar-web
2026-02-16 22:52:33 +03:30
parent c435319025
commit c2ccd32f39
@@ -60,7 +60,7 @@ public class ExpirePendingOrdersService : BackgroundService
var context = scope.ServiceProvider.GetRequiredService<IApplicationDbContext>();
var inventoryService = scope.ServiceProvider.GetRequiredService<IInventoryService>();
var cutoff = DateTime.UtcNow - ExpirationTime;
var cutoff = DateTime.Now - ExpirationTime;
// پیدا کردن سفارشات Pending قدیمی
var expiredOrders = await context.DiscountOrders