last command display the incorrect date per 2038 year issue.

Solution Verified - Updated -

Issue

  • Whe the RHEL system set date after Dec 19 2038 and then ssh to the system from other systems, last command would display the date as Dec 14 1901.

    [root@test ~]# uname -r
    5.14.0-570.16.1.el9_6.x86_64
    [root@test ~]# date
    Thu May 29 02:21:06 PM CST 2025
    [root@test ~]# date -s "2038/1/19 12:15:00"
    Tue Jan 19 12:15:00 PM CST 2038
    [root@test ~]# last -F
    root     pts/2        192.168.X.X      Sat Dec 14 05:48:24 1901   gone - no logout
    root     pts/1        192.168.X.XX     Thu May 29 11:22:00 2025   gone - no logout
    ...
    [root@test ~]# who
    root     pts/0        2025-05-27 09:32 (192.168.X.XX)
    root     pts/1        2025-05-29 11:22 (192.168.X.XX)
    root     pts/2        1901-12-14 05:48 (192.168.X.X)
    

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • wtmp

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content