Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-21-2010, 09:46 AM
|
#1
|
Member
Registered: Dec 2008
Location: New York
Distribution: RedHat, Solaris
Posts: 68
Rep:
|
Different date shown for regular user and root user
Hello guys I am currently different dates between two users. When I am a regular user I see a different time stamp for the date command and when logged in as root I see a different time. See below:
[someuser@webserver ~]$ date
Wed Jul 21 14:38:02 UTC 2010
[someuser@webserver ~]$ su -
Password:
[root@webserver ~]# date
Wed Jul 21 09:38:10 CDT 2010
Could this be a permissions issue? I don't think this could be related to the .profile or .bashrc but a little stumped.
Thanks for any help.
|
|
|
07-21-2010, 09:55 AM
|
#2
|
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,153
|
Has someuser set their TZ environment variable?
echo $TZ
|
|
|
07-21-2010, 09:57 AM
|
#3
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Definitely go with what Tredegar wrote -- further: maybe one time is in UTC (GMT) while the other is some timezone that is 5 hrs different from UTC.
EDIT -- Oop, it looks like exactly that: One is in UTC, and the other is CDT.
|
|
|
07-21-2010, 10:04 AM
|
#4
|
Member
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Rep:
|
|
|
|
07-21-2010, 11:25 PM
|
#5
|
Member
Registered: Dec 2008
Location: New York
Distribution: RedHat, Solaris
Posts: 68
Original Poster
Rep:
|
Thank you very much guys for the tips. I will take a look at the $TZ variable. Never even knew this existed.
|
|
|
07-22-2010, 09:54 AM
|
#6
|
Member
Registered: Dec 2008
Location: New York
Distribution: RedHat, Solaris
Posts: 68
Original Poster
Rep:
|
Update
Issue solved! I set the TZ variable: "export TZ=US/Mountain" and it solved my difference in time. I will add to my .bash_profile. Thank you to all responders.
|
|
|
11-27-2013, 08:33 AM
|
#7
|
LQ Newbie
Registered: Nov 2013
Posts: 1
Rep: 
|
Jaswanth
Hi,I have the same problem in one of my server all the normal users (not 1 user) showing the different time zone and the root user have the different time zone. in this case you suggest to change the TZ in all the normal users bash profile ?
|
|
|
All times are GMT -5. The time now is 06:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|