@@ -1323,13 +1323,13 @@ changes:
1323
1323
-->
1324
1324
1325
1325
* ` fd ` {integer}
1326
- * ` atime ` {integer }
1327
- * ` mtime ` {integer }
1326
+ * ` atime ` {number|string|Date }
1327
+ * ` mtime ` {number|string|Date }
1328
1328
* ` callback ` {Function}
1329
1329
* ` err ` {Error}
1330
1330
1331
- Change the file timestamps of a file referenced by the supplied file
1332
- descriptor.
1331
+ Change the file system timestamps of the object referenced by the supplied file
1332
+ descriptor. See [ ` fs.utimes() ` ] [ ] .
1333
1333
1334
1334
* Note* : This function does not work on AIX versions before 7.1, it will return
1335
1335
the error ` UV_ENOSYS ` .
@@ -2354,21 +2354,18 @@ changes:
2354
2354
-->
2355
2355
2356
2356
* ` path ` {string|Buffer|URL}
2357
- * ` atime ` {integer }
2358
- * ` mtime ` {integer }
2357
+ * ` atime ` {number|string|Date }
2358
+ * ` mtime ` {number|string|Date }
2359
2359
* ` callback ` {Function}
2360
2360
* ` err ` {Error}
2361
2361
2362
- Change file timestamps of the file referenced by the supplied path.
2363
-
2364
- * Note* : The arguments ` atime ` and ` mtime ` of the following related functions
2365
- follow these rules:
2362
+ Change the file system timestamps of the object referenced by ` path ` .
2366
2363
2367
- - The value should be a Unix timestamp in seconds. For example, ` Date.now() `
2368
- returns milliseconds, so it should be divided by 1000 before passing it in.
2369
- - If the value is a numeric string like ` '123456789' ` , the value will get
2370
- converted to the corresponding number.
2371
- - If the value is ` NaN ` , ` Infinity ` or ` -Infinity ` , an Error will be thrown.
2364
+ The ` atime ` and ` mtime ` arguments follow these rules:
2365
+ - Values can be either numbers representing Unix epoch time, ` Date ` s, or a
2366
+ numeric string like ` '123456789.0' ` .
2367
+ - If the value can not be converted to a number, or is ` NaN ` , ` Infinity ` or
2368
+ ` -Infinity ` , a ` Error ` will be thrown.
2372
2369
2373
2370
## fs.utimesSync(path, atime, mtime)
2374
2371
<!-- YAML
0 commit comments