Translated message

A translation of this page exists in English.

2038 年問題により last コマンドで誤った日付が表示される

Solution In Progress - Updated -

Issue

  • RHEL システムが日付を 2038 年 12 月 19 日より後に設定し、そのシステムに他のシステムから ssh で接続すると、last コマンドで 1901 年 12 月 14 日の日付が表示されます。

    [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