LinuxQuestions.org
Latest LQ Deal: Linux Power User 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 06-17-2009, 03:05 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
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
 
Old 06-17-2009, 03:32 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by ust View Post
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
If I understand you correctly you want your time to always be GMT. I would select London, as you've done and disable the automatic summertime adjustment feature.
cheers,
jdk
 
Old 06-17-2009, 03:50 AM   #3
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jdkaye View Post
If I understand you correctly you want your time to always be GMT. I would select London, as you've done and disable the automatic summertime adjustment feature.
cheers,
jdk
Yes , I just want to change to GMT but now is BST , I need to do is disable "summertime adjustment feature" ? can advise what I can do it ? thx
 
Old 06-17-2009, 03:53 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by ust View Post
Yes , I just want to change to GMT but now is BST , I need to do is disable "summertime adjustment feature" ? can advise what I can do it ? thx
I don't know that off the top of my head. I can look it up myself but then so can you. Are you too busy to do that yourself?
cheers,
jdk
 
Old 06-17-2009, 04:28 AM   #5
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jdkaye View Post
I don't know that off the top of my head. I can look it up myself but then so can you. Are you too busy to do that yourself?
cheers,
jdk

thx reply ,

I use tzselect and tried setup command of Redhat , but can't find GMT ...

so I just ask it . thx.
 
Old 06-17-2009, 04:48 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by ust View Post
thx reply ,

I use tzselect and tried setup command of Redhat , but can't find GMT ...

so I just ask it . thx.
What about trying?
Code:
dpkg-reconfigure tzdata
jdk
 
Old 06-17-2009, 04:54 AM   #7
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by ust View Post
thx reply ,

I use tzselect and tried setup command of Redhat , but can't find GMT ...

so I just ask it . thx.
I also found this after 20 seconds of googling:


Quote:
-> Editing the file /etc/default/rcS with

Code:
gksudo gedit /etc/default/rcS
and changing the UTS parameter to either: UTC=yes or UTC=no seems to enable/disable DST functionality.

(P.S. The biggest asset of a Linux user is patience.)
cheers,
jdk
 
Old 06-17-2009, 05:13 AM   #8
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jdkaye View Post
I also found this after 20 seconds of googling:



cheers,
jdk
thx replies ,

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
 
Old 06-17-2009, 05:21 AM   #9
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
If we're talking about debian then
Code:
sudo aptitude install initscripts
otherwise there's loads more solutions. Just google for them.
jdk

Last edited by jdkaye; 06-17-2009 at 05:25 AM.
 
Old 06-17-2009, 05:25 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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

Last edited by EricTRA; 06-17-2009 at 05:28 AM.
 
Old 06-17-2009, 05:41 AM   #11
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by EricTRA View Post
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
fix reply ,
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 ?
 
Old 06-17-2009, 06:01 AM   #12
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 05-07-2010, 08:13 PM   #13
smithy2010
Member
 
Registered: May 2010
Location: UK
Distribution: OpenSuse 64 bit
Posts: 45

Rep: Reputation: 15
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

Last edited by smithy2010; 05-07-2010 at 08:14 PM.
 
1 members found this post helpful.
Old 05-07-2010, 10:45 PM   #14
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
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
 
1 members found this post helpful.
  


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
change NTP Time Zone eliufoo General 4 10-12-2008 06:52 AM
cron won't recognize time zone change rl92694 Linux - General 1 09-23-2008 11:33 AM
Change time zone procfs Linux - General 14 05-03-2006 11:16 PM
Time zone stuck in UTC - how to change? Ook Slackware 2 04-24-2005 11:55 PM
change UTC to EST time zone. brian_eye Linux - Newbie 1 10-27-2003 06:08 PM


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