LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-29-2004, 12:36 AM   #1
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Rep: Reputation: 15
Time issue


Greetings....


I am having a problem with the time settings on my computer.....all of the data I have read keeps refering back to a file /etc/localtime which is a link to /usr/share/timezone...................

I have neither file on my system.

Is there a specific package that configures these files.....

I think I am missing something obvious but I can't see the tree for the forest..

contents of /etc/sysconfig/clock

ZONE="America/Vancouver"
UTC=false
ARC=false

/sbin/hwclock

Wed Jan 28 21:31:44 2004

root@Wall# date

Wed Jan 28 21:31:50 UTC 2004



BTW....this box acts as firewall/router only and has been running great....
 
Old 01-29-2004, 01:57 PM   #2
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
Anyone have this problem before....

How to either reinstall a package that would allow me to set the timezone properly or another solution?

Not running X so dateconfig is no use..

Thanks
 
Old 01-29-2004, 02:07 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
You can create the /etc/localtime file yourself:

cp --remove-destination /usr/share/zoneinfo/<YourTimeZone> /etc/localtime

If you don't know the exact timezone or what timezone you are in you can use tzselect to get it. I see just now what your timezone is., so the correct command is:

$ cp --remove-destination /usr/share/zoneinfo/America/Vancouver /etc/localtime

Your /etc/sysconfig/clock file looks ok (although a bit extensive ZONE and ARC are not needed, but maybe there's a RedHat specific tool that uses them).
 
Old 01-29-2004, 03:47 PM   #4
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks Druuna.

Amazing that this system runs at all.....after I (cough) installed glibc-common (cough) I could see the zoneinfo directory. and able to use tzselect....and updated hwclock and sytem clock that now are both correct....

in the command you sent me...

$ cp --remove-destination /usr/share/zoneinfo/America/Vancouver /etc/localtime

what is --remove-destination? I also saw the command

$ ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime

is that the same command

Thanks for your help
 
Old 01-29-2004, 04:02 PM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Nope, those are not the same:

$ cp --remove-destination /usr/share/zoneinfo/America/Vancouver /etc/localtime
This one copies the file and removes existing destination (--remove-destination) file before attempting to open it. After this command there are 2 copies of the same file, with different names.

$ ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
This one makes (forces -f) a symbolic link (-s) with the name localtime that points to the timezone file. After this command there is only 1 copy of the file and a (symbolic) link pointing to that file.

You can use either one, I like to copy the file, but that's a personal choice.
 
Old 01-29-2004, 04:38 PM   #6
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks again Druuna...

Time is now fixed...on to the next problem LOL

Cheers
 
  


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
time issue... koyi Linux - Newbie 4 04-02-2005 07:39 AM
time issue chrisknight Linux - Software 2 06-02-2004 07:44 PM
Samba time issue olegarr Linux - Networking 1 09-15-2003 05:45 PM
Network Issue - Must change IP every time TotalNoob Linux - Networking 6 03-21-2003 03:24 PM
Date And Time Issue (Redhat 8) zenix Linux - Software 3 01-05-2003 12:35 AM


All times are GMT -5. The time now is 06:57 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