change time zone
I have Redhat server , I want to change it to GMT time zone , I tried to use tzselect to select "london" , then found the time zone is BST now , can advise what I need to do so that the time zone is GMT ? thx
|
Quote:
cheers, jdk |
Quote:
|
Quote:
cheers, jdk |
Quote:
thx reply , I use tzselect and tried setup command of Redhat , but can't find GMT ... so I just ask it . thx. |
Quote:
Code:
dpkg-reconfigure tzdata |
Quote:
Quote:
jdk |
Quote:
the comamnd dpkg-reconfigure tzdata is not available in my linux server , the file /etc/default/rcS is also not persent in my linux server thx |
If we're talking about debian then
Code:
sudo aptitude install initscripts jdk |
Hi,
Don't know what version of RH you are using but on my Enterprise version 5.3 typing the command: system-config-date gives me a 'graphical' menu from which I can set all options. Also: In order to change the timezone of your system you will need to access the file /etc/sysconfig/clock directly: #ZONE="America/New_York" ZONE="GMT" UTC=false ARC=false Note: If your system's BIOS has UTC set to true, then set UTC to true. If it has it set to false, set it to false. UTC in the configuration file must always reflect your BIOS settings. Kind regards, Eric |
Quote:
for your second method , I should use UTC ( ture or false ) or not ? my RH server now is true . I don't know what is my bios setting ? except reboot the server , how can I know the UTC setting of my bios ? |
Hello,
Standard Linux uses UTC time, if you don't want to use the Universal Time then you put UTC=false. First, to enter the BIOS you'll have to reboot and press a certain key or key-combo to enter the BIOS (it shows on the console when booting). Then in the BIOS you can verify. But if I'm not mistaking the command hwclock reads the information from the BIOS. Check if it gives you a different output then the regular date command does. This page: http://www.redhat.com/advice/tips/timezone.html might give you some more detailed info if needed. Kind regards, Eric |
I had similar problem and I did this:
To set up system time and then to synchronize it with hardware time and to move from BST to GMT do the following: EXAMPLE: log in as root: #date -s "Fri May 7 23:26:00 GMT 2010" #hwclock --set --date="Fri May 7 23:26:00 GMT 2010" next you need to set symbolic link, to do that run: # ln -sf /usr/share/zoneinfo/Europe/Greenwich /etc/localtime to display current hardware clock run: # hwclock to display current data and time run: # date -u Sat May 7 23:43:32 UTC 2010 to sync system and hardware clock run: # hwclock –systohc # hwclock Sat 07 May 2010 23:43:00 AM UTC -0.554798 seconds I hope it works for you as well Cheers Denis |
1. Logged in as root, check which timezone your machine is currently using by executing `date`
. You'll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone. 2.Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory. 3.If you wish, backup the previous timezone configuration by copying it to a different location. Such as mv /etc/localtime /etc/localtime-old 4.Create a symbolic link to the appropriate timezone from /etc/localtime. Example: ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime 5.If you have the utility rdate, update the current system time by executing /usr/bin/rdate -s time-a.nist.gov 6.Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. "America/Los_Angeles") 7.Set the hardware clock by executing: /sbin/hwclock --systohc |
All times are GMT -5. The time now is 09:02 AM. |