Format dates in UTC for RecentMailingStatsChart
Updated the `dateStr` variable in the `RecentMailingStatsChart` function to use `dayjs.utc(currentDate).format('YYYY-MM-DD')` instead of the previous method. This change ensures consistent date formatting across different time zones when aggregating statistics.
This commit is contained in:
parent
c14b33c77b
commit
ac1cdfb115
@ -55,7 +55,7 @@ export default function RecentMailingStatsChart({ days = 7 }: { days?: number })
|
|||||||
|
|
||||||
// Include all dates from startDate to endDate (today)
|
// Include all dates from startDate to endDate (today)
|
||||||
while (!currentDate.isAfter(endDate, 'day')) {
|
while (!currentDate.isAfter(endDate, 'day')) {
|
||||||
const dateStr = currentDate.format('YYYY-MM-DD');
|
const dateStr = dayjs.utc(currentDate).format('YYYY-MM-DD');
|
||||||
aggregatedStats[dateStr] = {
|
aggregatedStats[dateStr] = {
|
||||||
sentCount: 0,
|
sentCount: 0,
|
||||||
deliveredCount: 0,
|
deliveredCount: 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user