processes() time format fix (linux)

This commit is contained in:
Sebastian Hildebrandt 2022-12-12 00:12:43 +01:00
parent 97fde323c8
commit 2ac0ec6f13
4 changed files with 12 additions and 6 deletions

View File

@ -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) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.16.6</th>
<td>2022-12-12</td>
<td><span class="code">processes()</span> time format fix (linux)</td>
</tr>
<tr>
<th scope="row">5.16.5</th>
<td>2022-12-09</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.16.5</span></div>
<div class="version">New Version: <span id="version">5.16.6</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -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);
}