Merge pull request #2790 from basecamp/fix-utc-date-off-by-one

Fix off-by-one date display for UTC-negative timezone users
This commit is contained in:
Donal McBreen
2026-04-03 09:06:46 +01:00
committed by GitHub
+1 -1
View File
@@ -7,7 +7,7 @@ export function signedDifferenceInDays(fromDate, toDate) {
}
export function beginningOfDay(date) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate())
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()))
}
export function secondsToDate(seconds) {