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:
@@ -7,7 +7,7 @@ export function signedDifferenceInDays(fromDate, toDate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function beginningOfDay(date) {
|
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) {
|
export function secondsToDate(seconds) {
|
||||||
|
|||||||
Reference in New Issue
Block a user