LinuxQuestions.org
Register a domain and help support LQ
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 02-17-2006, 10:14 AM   #1
scbops
Member
 
Registered: Feb 2006
Posts: 97

Rep: Reputation: 15
Talking Setting a TimeZone


I am runing redhat AS4 and I want to set the UTC setting to GMT-6.I have done following thing but it doesnt work



/etc/sysconfig/clock

ln -sf /usr/share/zoneinfo/Etc/GMT-6 /etc/localtime

eg:

ZONE="Etc/GMT-6"
UTC=false
ARC=false




any idear..........................................
 
Old 02-17-2006, 11:27 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
i have no idea about RH but try in that file only
UTC=1
 
Old 02-17-2006, 12:14 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
uhmm... it worked for me...
Code:
-bash-2.05b$ export TZ="Etc/GMT-6"
-bash-2.05b$ date
Fri Feb 17 23:12:56 GMT-6 2006
-bash-2.05b$
May be the user environment is setting a different TZ variable, just I did above.
 
Old 02-17-2006, 12:24 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,183

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
If the file is correct, then it should work.

Here's the skinny...

(1) The various files in /usr/share/zoneinfo are time-zone information files. (See, e.g. man timezone.) There should be one for every time-zone on the planet, including daylight-savings time.

(2) The ln command creates symbolic links, where one file points to another. The file /etc/localtime should be such a symbolic link, pointing to one of those files.

(3) See man ln for information about the ln command and its options.

(4) Changes to the link should take place fairly immediately. I say "fairly," because programs (like the clock-program on your desktop) load this information from the timezone-file when they start up. They don't re-read it constantly; only when told to do so. So if you change the timezone, you might need to either log-off or to, say, push the button to "change clock options" ... hoping that your desktop-clock will then be prompted to notice the change.

(5) In most cases, the system clock is always set to UTC: Coordinated Universal Time. Thus the binary value in the clock-register does not change; only its interpretation when presenting the time to you.
 
  


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
Timezone All Over The World Xa! General 0 11-01-2004 10:41 AM
timezone problem Lord Zoltar Linux - General 5 09-13-2004 11:38 PM
KDE timezone JCdude2525 Linux - Software 1 08-14-2004 10:00 PM
setting the correct time & timezone from kde? Jelle Debian 8 07-03-2004 11:08 AM
Timezone Again rch LQ Suggestions & Feedback 5 05-20-2003 12:49 AM


All times are GMT -5. The time now is 08:27 PM.

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