@@ -1438,7 +1438,7 @@ added: v0.1.31
1438
1438
Asynchronous realpath(3). The ` callback ` gets two arguments `(err,
1439
1439
resolvedPath)` . May use ` process.cwd` to resolve relative paths.
1440
1440
1441
- Only paths that can be converted to UTF8 strings are supported.
1441
+ Only paths that can be converted to UTF8 strings are supported.
1442
1442
1443
1443
The optional ` options ` argument can be a string specifying an encoding, or an
1444
1444
object with an ` encoding ` property specifying the character encoding to use for
@@ -1637,13 +1637,15 @@ added: v0.4.2
1637
1637
1638
1638
Change file timestamps of the file referenced by the supplied path.
1639
1639
1640
- Note: the arguments ` atime ` and ` mtime ` of the following related functions does
1641
- follow the below rules:
1640
+ Note: the arguments ` atime ` and ` mtime ` of the following related functions
1641
+ follow these rules:
1642
1642
1643
- - If the value is a numberable string like ` '123456789' ` , the value would get
1644
- converted to corresponding number.
1645
- - If the value is ` NaN ` or ` Infinity ` , the value would get converted to
1646
- ` Date.now() ` .
1643
+ - The value should be a Unix timestamp in seconds. For example, ` Date.now() `
1644
+ returns milliseconds, so it should be divided by 1000 before passing it in.
1645
+ - If the value is a numeric string like ` '123456789' ` , the value will get
1646
+ converted to the corresponding number.
1647
+ - If the value is ` NaN ` or ` Infinity ` , the value will get converted to
1648
+ ` Date.now() / 1000 ` .
1647
1649
1648
1650
## fs.utimesSync(path, atime, mtime)
1649
1651
<!-- YAML
0 commit comments