LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2010, 03:23 AM   #1
toynbee
Member
 
Registered: Jan 2007
Location: Maryland
Distribution: Arch and Red Hat
Posts: 34

Rep: Reputation: 17
Incorrect Time Zone Displaying in Arch


Hi guys,

I have a server running ArchLinux; I recently installed openntpd on it. Since I started paying closer attention to the clock, I started noticing other things; specifically when I run the "date" command, it's returned in PST when it should be "EST":

[spice@sandbox ~]$ date
Sat Mar 6 00:17:42 PST 2010

I have set the hwclock to localtime, configured "HARDWARECLOCK" to "localtime" in rc.conf, and chosen two different (but accurate) values for TIMEZONE in rc.conf:

[spice@sandbox ~]$ hwclock
Sat 06 Mar 2010 03:17:38 AM PST -0.922220 seconds
[spice@sandbox ~]$ cat /etc/rc.conf | grep TIMEZONE
TIMEZONE="US/Eastern"
[spice@sandbox ~]$ cat /etc/rc.conf | grep HARDWARE
HARDWARECLOCK="localtime"

However, as you can see, "hwclock" and "date" both say they're showing PST, although hwclock is showing the time in EST. I am not sure whether this was the case before installing openntpd. Is there another place where I should be setting the time zone?

Thanks in advance!
 
Old 03-06-2010, 05:59 AM   #2
mpier
Member
 
Registered: Jan 2008
Location: Poland
Distribution: Slackware, Arch
Posts: 38

Rep: Reputation: 17
Hi,
try TZ=EST date and check /etc/localtime file, or copy your timezone there (cp /usr/share/zoneinfo/US/Eastern /etc/localtime).

edit:
Why don't you use UTC time?

Last edited by mpier; 03-06-2010 at 06:08 AM.
 
Old 03-06-2010, 07:18 AM   #3
toynbee
Member
 
Registered: Jan 2007
Location: Maryland
Distribution: Arch and Red Hat
Posts: 34

Original Poster
Rep: Reputation: 17
Thanks for your help; running "TZ=EST date" fixed the output for that line only. However, your second suggestion appears to have resolved the issue on a more permanent basis. (I had read that suggestion during my searches but dismissed it, for what reasons I do not recall.)

As for my preference on time zone, well, I guess it's just my preference. I have no legitimate reason to use (or not use) UTC. Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting time and time zone altogether properly in Slack-current, KDE4 spaceballs Slackware 3 04-20-2011 06:15 AM
Displaying Time Zone ddzc Linux - Software 2 02-27-2007 12:01 PM
Samba displaying incorrect disk capacity on windows clients... fred22 Linux - Software 1 03-30-2006 09:24 PM
Users Command displaying incorrect Usernames Sarolearthy Linux - General 11 03-29-2006 09:02 PM
Time Zone Incorrect: trouble in fixing it sanmartin Linux - Hardware 4 03-05-2005 01:35 PM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration