processes() time format fix (linux)
This commit is contained in:
+5
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user