Browse Source

lib/util/utimes: try to match appveyor

ci/travis-osximage
JP Richardson 9 years ago
parent
commit
470b4ab7dc
  1. 4
      lib/util/utimes.js

4
lib/util/utimes.js

@ -6,13 +6,13 @@ var HAS_MILLIS_RES = hasMillisRes()
// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
function hasMillisRes () {
// 550 millis past UNIX epoch
var d = new Date(550)
var d = new Date(1435410243862)
var tmpfile = path.join(require('os').tmpdir(), 'millis-test')
fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
var fd = fs.openSync(tmpfile, 'r+')
fs.futimesSync(fd, d, d)
fs.closeSync(fd)
return fs.statSync(tmpfile).mtime > 0
return fs.statSync(tmpfile).mtime > 1435410243000
}
function timeRemoveMillis (timestamp) {

Loading…
Cancel
Save