LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-09-2005, 06:16 PM   #1
Samppa72
LQ Newbie
 
Registered: Sep 2003
Posts: 20

Rep: Reputation: 0
Change from localtime to UTC (GTM+2) not working


HI,

I have used linux for years now, in a multiboot configuration with Windows...

Thats why I used, as suggested, localtime in linux as opposed to GMT.

Now that I realized the benefits from using GMT and tried to change to it in Mandrake 10 Control Center, I seemed to work... I chose Helsinki as my timezone.
But when I reboot, the time is always 2 hours behing my localtime (Helsinki GMT +2). I believe this happens, because NTPD does not understand I'm not living in London (GMT, UTC). Using date command says it is in UTC timezone (for example 10. 01:54:07 UTC 2005)... How do I change this so that I can still use NTP (ntpdate -u tock.keso.fi
for example in my init scripts) to correct my hardware clock and still get the correct timezone time??????

/etc/sysconfig/clock says:

UTC=true
ARC=false
ZONE=Europe/Helsinki

Tried something like ln -sf /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
with no success..

The thing here is that while I can set my kde applet to Athens/helsinki timezone, every other program sees my clock as being 2 hours behind.... Icluding mythtv and crontabs.

Last edited by Samppa72; 12-09-2005 at 06:45 PM.
 
Old 12-09-2005, 08:13 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
OK i think just make /etc/sysconfig/clock
UTC=1
nothing more i don't think look at your timeset bootscript to see

that link you made to your timezone should be fine

there is one more thing to do is set a variable TZ in /etc/profile
that should be
export TZ=Europe/Helsinki

the thing is that if you boot windows it will reset your bios hardware clock to Local i think so sometimes startup will just be off and you will have to fix by resetting sysclock using date or kde applet might do it or using ntpdate should work fine still as well then writing that out to hwclock like
hwclock --systohc --utc


the commands to use in your boot scripts to save and load time script should evaluate the UTC setting we discussed earlier or you can have it skip that part and get straight to buisness
commands are
load (init)
hwclock --hctosys --utc

save (shutdown) this one will set things right after when you have to set clock by hand because of windows also
hwclock --systohc --utc

hope that helps
 
  


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
GUI clocks show UTC instead of localtime awu72 Linux - Newbie 2 05-09-2005 12:40 AM
Time zone stuck in UTC - how to change? Ook Slackware 2 04-24-2005 10:55 PM
localtime / date question with openBSD lazlow69 *BSD 6 12-14-2004 07:50 PM
change UTC to EST time zone. brian_eye Linux - Newbie 1 10-27-2003 05:08 PM
Gtm sonikntails Linux - Software 0 05-07-2002 10:06 PM


All times are GMT -5. The time now is 04:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration