You are not logged in.
Hello, I'm new to Arch Linux and I love it. But I'm facing a problem which I can't find the solution anywhere: Time displayed in gnome (I use gnome GUI) and from the output of "date" are wrong. In addition to this: Since I installed archlinux, the time on windows (which is on another partition on the same disk) is wrong too.
Here's the ouput of "hwlock --debug"
hwclock de util-linux 2.21.2
Utilisant /dev interface to clock.
On assume que l'horloge matérielle est conservée dans le temps de UTC.
En attente d'un tic d'horloge…
… a obtenu un tic d'horloge
Heure lue de l'horloge matérielle : 2012/08/20 16:03:30
Heure de l'horloge matérielle : 2012/08/20 16:03:30 = 1345478610 secondes depuis 1969
lun 20 aoû 2012 12:03:30 EDT -0.644257 secondes
(I use french system, sorry
)
Here's the output of "date"
lun aoû 20 12:10:19 EDT 2012
The thing is, that the real time where I live is 13:10. I don't know if I should use EDT or UTC. I have already searched on Beginners' Guide - ArchWiki - Wiki - Arch Linux and Time - ArchWiki but I haven't figured out how to solve the problem. I usually find solution myself in other forum topics and/or tutorials, but now I can't find it and i'm lacking patience.
Thank you
Last edited by sim590 (2012-09-11 19:21:28)
Offline
The thing is, that the real time where I live is 13:10. I don't know if I should use EDT or UTC. I have already searched on Beginners' Guide - ArchWiki - Wiki - Arch Linux and Time - ArchWiki but I haven't figured out how to solve the problem. I usually find solution myself in other forum topics and/or tutorials, but now I can't find it and i'm lacking patience. Thank you
If you're using iniscripts, post your rc.conf since I assume you have HARDWARECLOCK set to "localtime" (or post /etc/adjtime and /etc/timezone if you're using systemd or have configured your system with the latest instructions).
Where do you live? The timezone setting should match your location. If you live on the Eastern US coast, either "America/New_York" or "EST5EDT" should work. If you live in France, "CEST" or "Europe/Paris" should work. Be sure to either symlink or copy the appropriate zoneinfo file from /usr/share/zoneinfo to /etc/localtime. Also set the appropriate values in either rc.conf or /etc/timezone. The latter is for systemd compatibility, but I can't say for certain if it will replace the rc.conf values (as I understand it, your old rc.conf settings should still work).
He who has no .plan has small finger.
~Confucius on UNIX.
Offline
Here's the configuration of the file "rc.conf":
#
# /etc/rc.conf - configuration file for initscripts
#
# Most of rc.conf has been replaced by various other configuration
# files. See archlinux(7) for details.
#
# For more details on rc.conf see rc.conf(5).
#
TIMEZONE=Canada/Eastern
DAEMONS=(syslog-ng dbus networkmanager !network crond)
# Storage
#
# USEDMRAID="no"
# USELVM="no"
# Network
#
interface=eth0
address=
netmask=
gateway=In fact, I have configured the system with the latest instructions and created the files that systemd needs. But when I installed it, it made my pc very slower than when I use initscripts so I gave it up and swtiched back to initscripts. Even if those files may not matter since I use initscripts, here are the files:
"/etc/adjtime"
0.000000 1345479900 0.000000
1345479900
UTC"/etc/timezone"
0.000000 1345479900 0.000000
1345479900
UTCI live in Canada, Québec, so I guess timezone should be "Canada/Eastern". As I was reading some post, at a certain point, someone said to delete the link /etc/localtime. I didn't recreated it. I'll do it right now.
Offline
sorry,
"/etc/timezone" is
Canada/EasternOffline
Time displayed in gnome (I use gnome GUI) and from the output of "date" are wrong.
Install chrony - that seems to be the best (others are ntpd and openntpd).
the time on windows (which is on another partition on the same disk) is wrong too.
You have to sync Arch & Windows to use either UTC (best) or localtime.
Last edited by brebs (2012-08-20 20:09:52)
Offline
/etc/adjtime is wrong if you want to use localtime.
It should contain:
0.0 0.0 0.0
0
LOCALSee https://wiki.archlinux.org/index.php/Sy … clock_time
edit: I guess this shouldn't matter since you are not using systemd anymore.
Last edited by Terminator (2012-08-20 20:22:30)
Offline
Well, it's good you tell me anyway. I'll switch for systemd as soon as I understand it and if I discover how to make it run without making my pc extremly lag for no reason.
EDIT: I guess it matters! I changed it to what you said and now it says it's 19:36 when supposed to be 16:36!
Output of "date"
lun aoû 20 19:36:55 EDT 2012Output of "hwclock --debug"
hwclock de util-linux 2.21.2
Utilisant /dev interface to clock.
Le dernier ajustement de dérive a été fait 0 secondes après 1969
La dernière calibration a été faite 0 secondes après 1969
L'horloge matérielle fonctionne selon le temps locale
On assume que l'horloge matérielle est conservée dans le temps de locale.
En attente d'un tic d'horloge…
… a obtenu un tic d'horloge
Heure lue de l'horloge matérielle : 2012/08/20 19:37:50
Heure de l'horloge matérielle : 2012/08/20 19:37:50 = 1345505870 secondes depuis 1969
lun 20 aoû 2012 19:37:50 EDT -0.244808 secondesLast edited by sim590 (2012-08-20 20:38:59)
Offline
sim590 wrote:Time displayed in gnome (I use gnome GUI) and from the output of "date" are wrong.
Install chrony - that seems to be the best (others are ntpd and openntpd).
the time on windows (which is on another partition on the same disk) is wrong too.
You have to sync Arch & Windows to use either UTC (best) or localtime.
Ok, i'll try that and give you some news!
EDIT: But why do I have to install software in addition to the arch system to get the date to work? It sounds like if arch wasn't enough or that the software you tell me to install is more like a bandaid than a solution.
Last edited by sim590 (2012-08-20 20:51:52)
Offline
Another thing: gnome's date and time configuration panel says im in Europe/London. It might help..
Offline
Another thing: gnome's date and time configuration panel says im in Europe/London. It might help..
What's the output of
strings /etc/localtimeHe who has no .plan has small finger.
~Confucius on UNIX.
Offline
sim590 wrote:Another thing: gnome's date and time configuration panel says im in Europe/London. It might help..
What's the output of
strings /etc/localtime
It's:
TZif2
6`/~Kp0
`1gg
`3GI
`5'+
pCda`D/vpEDC`E
@`M|kpN
"`O\MpP
`Q</pRu
k`b-
pcgM`d
xpeG/`e
Zpg'
<`|~gp}
`~^Ip
TZif2
/~Kp
Cda`
D/vp
EDC`
M|kp
O\Mp
Q</p
cgM`
eG/`
|~gp
~^Ip
EST5EDT,M3.2.0,M11.1.0Offline
And what is the output of
ls -l /etc/localtimeOffline
And what is the output of
ls -l /etc/localtime
It's
lrwxrwxrwx 1 root root 34 20 aoû 14:19 /etc/localtime -> /usr/share/zoneinfo/Canada/EasternOffline
(I use french system, sorry
)
Don't be.
But you can do this:
LC_ALL=C hwclock --debug![]()
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
How many hours are you behind UTC? I would have thought four, but are you only three?
This does not look good:
On assume que l'horloge matérielle est conservée dans le temps de locale.
I don't speak French, but I've a hunch that is telling me that your system assumes the hardware clock is set to local time.
Are you using systemd instead of initscripts? If you don't know, it is initscripts ![]()
If initscripts , make certain that you have the line HARDWARECLOCK="UTC" in your /etc/rc.conf.
Also, the more I look, ignore my first question. Your hardware clock is set one hour behind UTC. We can fix that later.
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
How many hours are you behind UTC? I would have thought four, but are you only three?
This does not look good:
On assume que l'horloge matérielle est conservée dans le temps de locale.
I don't speak French, but I've a hunch that is telling me that your system assumes the hardware clock is set to local time.Are you using systemd instead of initscripts? If you don't know, it is initscripts
If initscripts , make certain that you have the line HARDWARECLOCK="UTC" in your /etc/rc.conf.Also, the more I look, ignore my first question. Your hardware clock is set one hour behind UTC. We can fix that later.
Ok, I have fixed the file /etc/rc.conf by adding this line
HARDWARECLOCK="UTC" Then, when I rebooted, I saw a red message telling: /etc/rc.conf says RTC is UTC, but /etc/adjtime says it's localtime. So I figured (easily,
) that those two files confront each other. Since I use initscripts, I should delete /etc/adjtime, should I?
Plus, after the reboot, when I logged back in, I noticed the date changed from REALTIME + 3hours to REALTIME - 1hours.
Offline
]Since I use initscripts, I should delete /etc/adjtime, should I?
Yes. Then reboot.
Then let us look at the output of hwclock --debug again.
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
sim590 wrote:]Since I use initscripts, I should delete /etc/adjtime, should I?
Yes. Then reboot.
Then let us look at the output of hwclock --debug again.
I moved /etc/adjtime to /etc/adjtime.backup. Here is the new output of "LC_ALL=C hwclock --debug":
hwclock from util-linux 2.21.2
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2012/08/21 13:01:18
Hw clock time : 2012/08/21 13:01:18 = 1345554078 seconds since 1969
Tue Aug 21 09:01:18 2012 -0.812997 secondsEDIT: Time should be 10:01 by the way!
Last edited by sim590 (2012-08-21 14:06:13)
Offline
Are you dualbooting some silly OS that doesn't support having the hwclock as utc?
If not, just run ntpd -qg, check the time, if correct, hwclock -uw
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Are you dualbooting some silly OS that doesn't support having the hwclock as utc?
If not, just run ntpd -qg, check the time, if correct, hwclock -uw
The only OS's installed on my computer are Arch Linux and Windows. Again, if I understand well this, installing a software onto Arch to get the time right sounds more like a patch than a solution. I'd like to solve the problem by configuring the right way. But, could
hw clock -uwsolve my problem?
Offline
Time should be 10:01 by the way!
So set it. "man date" shows you how.
Then set the *hardware* clock with:
hwclock -s -uNotice that there's no random space in "hwclock"?
Then install Chrony, to not have to bother with this again, as I mentioned.
Then reboot into and configure Windows to use UTC, as I mentioned.
The first time this is all done, it's confusing because one gets all the UTC/localtime/timezone mixups.
Offline
I moved /etc/adjtime to /etc/adjtime.backup. Here is the new output of "LC_ALL=C hwclock --debug":
hwclock from util-linux 2.21.2 Using /dev interface to clock. Assuming hardware clock is kept in UTC time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2012/08/21 13:01:18 Hw clock time : 2012/08/21 13:01:18 = 1345554078 seconds since 1969 Tue Aug 21 09:01:18 2012 -0.812997 secondsEDIT: Time should be 10:01 by the way!
But notice what time your system thinks UTC is. That is wrong. it should have been 14:01. It is off by an hour. Lets fix that.
Set the kernel time using the date command. sudo date -s "hh:mm" where hh is in 24 hour format (local time) and mm are the minutes.
Check that it is correct with date
Now, the kernel knows the local time, and the UTC; but the hardware (BIOS) clock does not; it is still off by an hour.
Do a hwclock --systohc which will push the kernel (System) time into the BIOS clock.
Reboot, and see if all is well
Edit: Sorry brebs. I did not read your post. We said the same thing (basically). I prefer ntpd. Vive la différence
Edit: Added quotes in date command
Last edited by ewaller (2012-08-21 17:29:03)
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
I prefer ntpd.
So did I, until earlier this month. Now I've switched to chrony - here's some reasons.
Offline
The commands you guys told me to run fixed the problem!
And if I understand well, all I gotta do is install one of those software and no further configuration is needed in order for Windows to not mess everything up?
Offline
The commands you guys told me to run fixed the problem!
And if I understand well, all I gotta do is install one of those software and no further configuration is needed in order for Windows to not mess everything up?
Mostly. ![]()
If you're running Windows and therefore have your hardware clock set to local time instead of UTC (and left Windows at its default configuration), there's a strong possibility that your clock can get changed twice if you live in a timezone that recognizes DST--once under Arch, once under Windows. It's an easy enough fix, but it's worth being aware of lest you be surprised!
He who has no .plan has small finger.
~Confucius on UNIX.
Offline