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.
This commit is contained in:
Andreas Kling 2020-09-06 19:07:51 +02:00
parent d531b4fa61
commit c995166c56

View file

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