LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Change from localtime to UTC (GTM+2) not working (https://www.linuxquestions.org/questions/linux-software-2/change-from-localtime-to-utc-gtm-2-not-working-391081/)

Samppa72 12-09-2005 06:16 PM

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.

foo_bar_foo 12-09-2005 08:13 PM

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


All times are GMT -5. The time now is 11:19 AM.