diff --git a/CHANGELOG.md b/CHANGELOG.md index 04aca40..2954206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.16.6 | 2022-12-12 | `processes()` time format fix (linux) | | 5.16.5 | 2022-12-09 | `inetLatency()` fix for alpine (linux) | | 5.16.4 | 2022-12-09 | `processes()` fix started (linux alpine) | | 5.16.3 | 2022-12-08 | `users()` fix when multiple explorer.exe (windows) | diff --git a/docs/history.html b/docs/history.html index 7ac1c16..cb8cbe7 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.16.6 + 2022-12-12 + processes() time format fix (linux) + 5.16.5 2022-12-09 diff --git a/docs/index.html b/docs/index.html index 5740b0f..7f5f332 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.16.5
+
New Version: 5.16.6
diff --git a/lib/processes.js b/lib/processes.js index 912365e..1636fc2 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -653,12 +653,12 @@ function processes(callback) { function parseProcesses2(lines) { function formatDateTime(time) { - const month = ('0' + (time.getMonth() + 1).toString()).substr(-2); + const month = ('0' + (time.getMonth() + 1).toString()).slice(-2); const year = time.getFullYear().toString(); - const day = ('0' + time.getDate().toString()).substr(-2); - const hours = time.getHours().toString(); - const mins = time.getMinutes().toString(); - const secs = ('0' + time.getSeconds().toString()).substr(-2); + const day = ('0' + time.getDate().toString()).slice(-2); + const hours = ('0' + time.getHours().toString()).slice(-2); + const mins = ('0' + time.getMinutes().toString()).slice(-2); + const secs = ('0' + time.getSeconds().toString()).slice(-2); return (year + '-' + month + '-' + day + ' ' + hours + ':' + mins + ':' + secs); }