It appears that the time given by the 'date' command when logged in as a user is different than the one given when logged in as root. What is the cause of this discrepancy?
Updated -
Without arguments, the date
command prints the current time for a chosen timezone.
The date
command uses the timezone information specified in environment variable TZ when printing dates. If TZ is not set, or is set invalidly, date
will instead use the timezone specified in /etc/localtime
.
To see the value of the TZ environment ...
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.