Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In

[root@localhost ~]# man who

-t means

t, --time print last system clock change

I changed the system time using using

[root@localhost ~]# date -s 05:27:00

Thu Jul 12 05:27:00 IST 2012

After that i checked the date, and its changed.

[root@localhost ~]# date

Thu Jul 12 05:27:02 IST 2012

but while running below command it's showing nothing why?

[root@localhost ~]# who -t

[root@localhost ~]#

I am using CentOS 6.2

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

who does nothing more than read the utmp file /run/utmp1. Since the Linux kernel does not log clock changes by default, it remains up to the date program, or another utility, to add the necessary utmp entries. However, it doesn't seem that this was ever implemented in the GNU Coreutils version of date. (It is still done by date on FreeBSD, for example.)

(Keep in mind that utmp is, usually, reset every boot, so its "clock change" field is much less useful now than it was in the Unix mainframe days.)


1 Other locations: /var/run/utmp, /var/run/utx.active (FreeBSD), /var/adm/utmp, /etc/utmp.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.