Commit 51382e6
authored
fix: dateToUnix to preserve the date #434
trunc the ms instead of round to avoid edge cases where the date would be changed example:
Math.round((new Date('2024-12-10T23:59:59.999Z')).getTime() / 1000)
vs
Math.trunc((new Date('2024-12-10T23:59:59.999Z')).getTime() / 1000)1 parent f42771c commit 51382e6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments