Skip to content

Commit fe12955

Browse files
authored
Merge pull request #435 from DerBasler/master
fix: dateToUnix to preserve the date #434
2 parents f42771c + 51382e6 commit fe12955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Date/dateUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function showWeekDay(
1212
}
1313

1414
export function dateToUnix(d: Date): number {
15-
return Math.round(d.getTime() / 1000)
15+
return Math.trunc(d.getTime() / 1000)
1616
}
1717

1818
export function addMonths(date: Date, count: number) {

0 commit comments

Comments
 (0)