diff options
author | Parker Gabel <parkerdgabel@email.arizona.edu> | 2020-04-03 12:20:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 15:20:40 -0400 |
commit | 0db04d6a429eb498e854a5fc1ef905b87dea5e4d (patch) | |
tree | d8a5fc6d7262622b2209b80afd28d8c4fc1304e6 /cli/js/ops | |
parent | 24261744857df3cca8c9e05f07cc85c0346a6751 (diff) |
fix(#4546) Added Math.trunc to toSecondsFromEpoch to conform the result to u64 (#4575)
Diffstat (limited to 'cli/js/ops')
-rw-r--r-- | cli/js/ops/fs/utime.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/js/ops/fs/utime.ts b/cli/js/ops/fs/utime.ts index cd195531c..2755a7e96 100644 --- a/cli/js/ops/fs/utime.ts +++ b/cli/js/ops/fs/utime.ts @@ -2,7 +2,7 @@ import { sendSync, sendAsync } from "../dispatch_json.ts"; function toSecondsFromEpoch(v: number | Date): number { - return v instanceof Date ? v.valueOf() / 1000 : v; + return v instanceof Date ? Math.trunc(v.valueOf() / 1000) : v; } export function utimeSync( |