diff --git a/src/components/SaleCountdown.tsx b/src/components/SaleCountdown.tsx index 515229f..9b52b8d 100644 --- a/src/components/SaleCountdown.tsx +++ b/src/components/SaleCountdown.tsx @@ -31,8 +31,13 @@ export function SaleCountdown({ hasActiveSale, maxSalePercentage = 5, saleEndDat let targetDate: Date; if (saleEndDate) { - // Use the sale end date from admin - ensure proper timezone handling + // Use the sale end date from admin targetDate = new Date(saleEndDate); + + // Always set to end of day for proper countdown display + const saleDate = new Date(saleEndDate); + targetDate = new Date(saleDate.getFullYear(), saleDate.getMonth(), saleDate.getDate(), 23, 59, 59, 999); + console.log('Sale end date from DB:', saleEndDate); console.log('Parsed target date:', targetDate); console.log('Current time:', now);