diff options
| author | Nicolas LLOBERA <nllobera@gmail.com> | 2017-03-20 23:43:02 +0100 |
|---|---|---|
| committer | Nicolas LLOBERA <nllobera@gmail.com> | 2017-03-20 23:43:02 +0100 |
| commit | 132067b7bf7326f21b1a596fc8dd14b7ad2d99ae (patch) | |
| tree | f6189dfab60662dfe61f475ad84849436b31fc52 | |
| parent | 980b9f75b6c43b191ea0c62f733b6292a9dd11ec (diff) | |
displays the full date
| -rw-r--r-- | libs/last_login.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/last_login.php b/libs/last_login.php index 4596e44..4a3c8f8 100644 --- a/libs/last_login.php +++ b/libs/last_login.php @@ -7,7 +7,7 @@ $datas = array(); if ($Config->get('last_login:enable')) { - if (!(exec('/usr/bin/lastlog --time 365 | /usr/bin/awk -F\' \' \'{ print $1";"$5, $4, $8, $6}\'', $users))) + if (!(exec('/usr/bin/lastlog --time 365 | awk \'{ printf $1";"; for (i=4; i<NF; i++) printf $i" "; print $NF; }\'', $users))) { $datas[] = array( 'user' => 'N.A', @@ -30,4 +30,4 @@ if ($Config->get('last_login:enable')) } } -echo json_encode($datas);
\ No newline at end of file +echo json_encode($datas); |
