Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/internal/fs/utils.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,13 @@ const {
},
hideStackFrames
} = require('internal/errors');
const { isUint8Array, isArrayBufferView } = require('internal/util/types');
const {
isUint8Array,
isArrayBufferView,
isDate
} = require('internal/util/types');
const { once } = require('internal/util');
const pathModule = require('path');
const util = require('util');
const kType = Symbol('type');
const kStats = Symbol('stats');

Expand DownExpand Up@@ -383,7 +386,7 @@ function toUnixTimestamp(time, name = 'time') {
}
return time;
}
if (util.isDate(time)) {
if (isDate(time)) {
// Convert to 123.456 UNIX timestamp
return time.getTime() / 1000;
}
Expand Down