Package: wtmpdb
Version: 0.72.0-1
Severity: normal

Dear Maintainer,

for the command-line argument `last -p <TIME>` there are existing at
least 4 issues:

  1. last -p now
  
     Works on the older util-linux version and shows all current
     "still ..." active sessions.  But the wtmpdb version, which I am
     reporting here outputs

     $> last -p now
     Invalid time value 'now'

  2. last -p <TIME>

     The <TIME> is neither interpreted as UTC nor as local time.  My
     current system is using time zone (+0100) plus summer time, which
     results in (CEST, +0200).

     $> timedatectl 
             Local time: Sat 2025-04-05 04:08:45 CEST
                Universal time: Sat 2025-04-05 02:08:45 UTC
                      RTC time: Sat 2025-04-05 02:08:45
                     Time zone: Europe/Berlin (CEST, +0200)
     System clock synchronized: yes
                   NTP service: active
               RTC in local TZ: no

     In the following example a su(1) session starts at 03:39 local
     time.  To request it using -p argument I need to substract 1h,
     i.e. 02:39.  Don't know why 1h.

     $> wtmpdb last -p '2025-04-05 02:40:00'
     root     pts/0                         Sat Apr  5 03:39 - 03:47  (00:07)
     dirk     tty7         :0               Sat Apr  5 01:48 - still logged in
     reboot   system boot  6.12.20-amd64    Sat Apr  5 01:27 - still running

     wtmpdb begins Fri Apr  4 19:01:21 2025

     $> wtmpdb last -p '2025-04-05 02:38:00'
     dirk     tty7         :0               Sat Apr  5 01:48 - still logged in
     reboot   system boot  6.12.20-amd64    Sat Apr  5 01:27 - still running

     wtmpdb begins Fri Apr  4 19:01:21 2025

  3. last -p <RFC 3339 TIME>

     Wishlist: Would be nice if <TIME> accepts fully the RFC 3339
     format.  Then the following example should work, which is
     equivalent to `last -p now`:

     $> last -p "$(date --rfc-3339=seconds)"
     Invalid time value '2025-04-05 04:26:47+02:00'

  4. last -p

     Wishlist: Would be nice to make the <TIME> optional, like
     [<TIME>].  This should be equivalent to `last -p now`.

Greets,
Dirk =)


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.20-amd64 (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wtmpdb depends on:
ii  init-system-helpers  1.68
ii  libaudit1            1:4.0.2-2+b2
ii  libc6                2.41-6
ii  libsystemd0          257.4-3
ii  libwtmpdb0           0.72.0-1

Versions of packages wtmpdb recommends:
ii  libpam-wtmpdb  0.72.0-1

wtmpdb suggests no packages.

-- no debconf information

Reply via email to