]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (lslogins) use fixed time format
authorKarel Zak <kzak@redhat.com>
Mon, 17 Feb 2025 18:42:29 +0000 (19:42 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Feb 2025 19:45:01 +0000 (20:45 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/lslogins/checkuser
tests/ts/lslogins/checkuser

index 40370c71d39dd7e6d41f1f87a23815a814ec7801..38b2a8f1339ea64ca3ff41a92195664082d3f62e 100644 (file)
@@ -1,2 +1,2 @@
-USER  LAST-LOGIN LAST-TTY LAST-HOSTNAME
-root Jan29/07:45 test-tty test-host
+USER                LAST-LOGIN LAST-TTY LAST-HOSTNAME
+root 2024-01-29T07:45:15-08:00 test-tty test-host
index 74b1e35c12d8788321069b201a65f4342259106a..bf6cc9c0033696d4dd6737049f9cb15dab167003 100755 (executable)
@@ -18,7 +18,13 @@ fi
 sqlite3 $TS_SELF/lastlog2.db < $TS_SELF/create_db.sql
 
 # tests for lastlog2 environment
-TZ=US/Pacific "$TS_CMD_LSLOGINS" --lastlog-file=/dev/null --lastlog2-file="${TS_SELF}/lastlog2.db" --wtmp-file=/dev/null --btmp-file=/dev/null --output USER,LAST-LOGIN,LAST-TTY,LAST-HOSTNAME --logins=root > "$TS_OUTPUT"
+TZ=US/Pacific "$TS_CMD_LSLOGINS" --lastlog-file=/dev/null \
+       --lastlog2-file="${TS_SELF}/lastlog2.db" \
+       --wtmp-file=/dev/null \
+       --btmp-file=/dev/null \
+       --output USER,LAST-LOGIN,LAST-TTY,LAST-HOSTNAME \
+       --time-format iso \
+       --logins=root > "$TS_OUTPUT"
 
 rm $TS_SELF/lastlog2.db
 ts_finalize