You are not logged in.
Tue Jul 24 03:29:35 EEST 2012The time is advanced by 3 hours ( it should be 00:29:35, not 03:29:35 ) and I do not know why.
/etc/rc.conf
HARDWARECLOCK="UTC"
TIMEZONE="Europe/Riga"lrwxrwxrwx 1 root root 31 Jul 24 02:41 localtime -> /usr/share/zoneinfo/Europe/RigaWhat am I missing here ?
Last edited by Gamer (2012-07-24 06:53:47)
Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.
- Linus Torvalds
Offline
read this first:https://wiki.archlinux.org/index.php/Rc.conf and mark this is solved.
HARDWARECLOCK="localtime"Offline
Tue Jul 24 03:29:35 EEST 2012The time is advanced by 3 hours ( it should be 00:29:35, not 03:29:35 ) and I do not know why.
/etc/rc.conf
HARDWARECLOCK="UTC" TIMEZONE="Europe/Riga"lrwxrwxrwx 1 root root 31 Jul 24 02:41 localtime -> /usr/share/zoneinfo/Europe/RigaWhat am I missing here ?
There are several ways this could go wrong.
To understand what is happening, keep in mind that there is "system time" which is what "date" tells you. Then there is the "real time clock" which is what sets the system time on boot. The real time clock can either be kept in localtime or in UTC, and which one it is is stored both in HARDWARECLOCK in rc.conf and in the third line in /etc/adjtime. Sometimes these things get out of sync. I'll assume that what you want is your RTC in UTC, which is the default.
First, make sure your system time is correct. Either by using an ntp client, or by setting it manually using "date --set=<some string>" (see "man date").
Secondly, make sure there are no out-of-sync configurations around. The simplest way is to simply delete /etc/adjtime and remove the HARDWARECLOCK line from rc.conf. Then the default (UTC) will be used.
Finally, copy the "system time" to the RTC: "hwclock -w".
Offline
Excuse me, but wiki tells: "Configuring options in /etc/rc.conf still works, but is not anymore the official way.". As I understand, Arch want give up rc.conf in future.
How set hardware clock type by "official way"?
P.S. I apologize for my English, he's quite bad. ![]()
Offline
@shau-kote: the standard location is /etc/adjtime as described in "man 8 hwclock". Either edit the file manually and set the third line to either UTC or LOCAL, or (possibly easier) call: "hwclock --systohc --localtime" or "hwclock --systohc --utc" and it will be set for you. If you do this, make sure that HARDWARECOLCK in rc.conf is unset.
Offline
tomegun, thank you.
Offline
Also, the output of hwclock --debug is very telling.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
read this first:https://wiki.archlinux.org/index.php/Rc.conf and mark this is solved.
HARDWARECLOCK="localtime"
Thank you!
Tried it yesterday, but for some reason nothing changed. Today everything is fine though.
Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.
- Linus Torvalds
Offline