Fix dashboard date showing yesterday due to UTC parsing
Build and push image / build (push) Successful in 48s
Build and push image / build (push) Successful in 48s
Date-only ISO strings are parsed as UTC midnight, which displays as the previous day in US timezones. Append T00:00:00 to force local time interpretation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,8 @@ export function Dashboard({
|
||||
const lowBulk = stats.lowStockBulk;
|
||||
const lowDiscrete = stats.lowStockDiscreteGroups;
|
||||
|
||||
const todayDate = new Date(data.today || TODAY_STR);
|
||||
const todayStr = data.today || TODAY_STR;
|
||||
const todayDate = new Date(todayStr + "T00:00:00");
|
||||
const greetingDate = todayDate.toLocaleDateString("en-US", {
|
||||
weekday: "long",
|
||||
month: "long",
|
||||
|
||||
Reference in New Issue
Block a user