:: [DNG] 64-bit time in new wtmp logs …
Top Page
Delete this message
Reply to this message
Author: Lars Noodén
Date:  
To: dng
Subject: [DNG] 64-bit time in new wtmp logs on Excalibur
I think this is upstream from Devuan, but wtmp on Excalibur is now in
SQLite3 format with an integer which might be 64-bit time:

sqlite3 /var/log/wtmp.db

sqlite> SELECT User, max(Login) FROM wtmp WHERE User='lars';
lars|1785111082567371

sqlite> .schema
CREATE TABLE wtmp(ID INTEGER PRIMARY KEY, Type INTEGER, User TEXT NOT
NULL, Login INTEGER, Logout INTEGER, TTY TEXT, RemoteHost TEXT, Service
TEXT) STRICT;

The built-in datetime() function for SQLite3 does not handle that
integer as a date-time because it is clearly not a UNIX Epoch. Also,
the manual page for wtmp(5) for the login records seems to have
information about the old format only and does not even mention the file
wtmp.db.

How should that integer be processed to produce a human-readable date-time?

/Lars