summaryrefslogtreecommitdiff
path: root/ext/fs/30_fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r--ext/fs/30_fs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js
index 183e51e50..767ed11f4 100644
--- a/ext/fs/30_fs.js
+++ b/ext/fs/30_fs.js
@@ -473,8 +473,8 @@ function toUnixTimeFromEpoch(value) {
];
}
- const seconds = value;
- const nanoseconds = 0;
+ const seconds = MathTrunc(value);
+ const nanoseconds = MathTrunc((value * 1e3) - (seconds * 1e3)) * 1e6;
return [
seconds,