From c995166c56fbf5493baee37f7add38c9971ea497 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Sep 2020 19:07:51 +0200 Subject: [PATCH] utmpupdate: Store the login time in /var/run/utmp as a Unix timestamp This is obviously nicer and makes it easy for other programs to do what they want with the timestamp. --- Userland/utmpupdate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/utmpupdate.cpp b/Userland/utmpupdate.cpp index 3fa31c8dd0..5dce1febf9 100644 --- a/Userland/utmpupdate.cpp +++ b/Userland/utmpupdate.cpp @@ -67,7 +67,7 @@ int main(int argc, char** argv) entry.set("pid", pid); entry.set("uid", getuid()); entry.set("from", from); - entry.set("login_at", Core::DateTime::now().to_string()); + entry.set("login_at", time(nullptr)); json.set(tty_name, move(entry)); } else { ASSERT(flag_delete);