You are not logged in.
Pages: 1
Topic closed
I installed Arch today (not for the first time) and noticed that the time appears to be wrong.
Here's the output from timedatectl status:
Local time: Tue 2013-07-30 01:33:13 BST
Universal time: Tue 2013-07-30 00:33:13 UTC
Timezone: Europe/Belfast (BST, +0100)
NTP enabled: n/a
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-31 00:59:59 GMT
Sun 2013-03-31 02:00:00 BST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-10-27 01:59:59 BST
Sun 2013-10-27 01:00:00 GMT
As you can see, the timezone is set to Europe/Belfast and DST is active, however the time is an hour later than it should be.
The current localtime in Belfast should be what universal time is. Here is the current time in Belfast.
Have I overlooked something, or is there something wrong with the Europe/Belfast timezone (I've used it in previous Arch installs with the correct time)? I know the time can be set manually, however I'd prefer to use the timezone so that the time is more accurate.
Last edited by NorthAntrim (2013-07-30 00:45:20)
Offline
The page you linked says
Current time zone offset: UTC/GMT +1 hour
This appears to say that your local time should be UTC+one hour. Are you saying that the time displayed on your system is UTC+2 hours, or that it is UTC+1 hour and that this wrong? From the output you gave (UTC is the correct time in your timezone) it appears that your hardware clock is not in fact set to UTC, but it is set to your local time.
What is the output of
sudo hwclock --debug
And when you run this command, what is your correct local time?
Compare what your hardware clock thinks is UTC to this: http://www.worldtimeserver.com/current_time_in_UTC.aspx
Last edited by 2ManyDogs (2013-07-29 23:50:39)
Offline
The page you linked says
Current time zone offset: UTC/GMT +1 hour
This seems to say that your local time should be UTC+one hour. Are you saying that the time displayed on your system is UTC+2 hours, or that it is UTC+1 hour and that this wrong?
What is the output of
sudo hwclock --debug
Thanks for the reply.
The local time according to Arch is 01:48, however the local time is actually 00:48, and UTC according to Google is 23:48 (at the time of writing of course) so it's UTC+2 hours.
Here's the output from sudo hwclock --debug:
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375127579 seconds after 1969
Last calibration done at 1375127579 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 00:47:32
Hw clock time : 2013/07/30 00:47:32 = 1375145252 seconds since 1969
Tue 30 Jul 2013 01:47:32 BST -0.531893 seconds
I'm almost certain I set the hardware clock to use UTC, usually I do.
Thanks again.
Last edited by NorthAntrim (2013-07-29 23:52:58)
Offline
Time read from Hardware Clock: 2013/07/30 00:47:32
Correct UTC time (from http://www.worldtimeserver.com/current_time_in_UTC.aspx is (approximately) 23:48. Your hardware clock is wrong.
You can correct this manually, or if you are using ntpd, try
sudo ntpd -qg
Last edited by 2ManyDogs (2013-07-29 23:55:12)
Offline
NorthAntrim wrote:Time read from Hardware Clock: 2013/07/30 00:47:32
Correct UTC time (from http://www.worldtimeserver.com/current_time_in_UTC.aspx is (approximately) 23:48. Your hardware clock is wrong.
Thanks. I ran
hwclock --systohc --utc
again and
timedatectl set-local-rtc 0
, however the time hasn't changed (didn't reboot). Any idea what I could do to correct this/why it's wrong?
Last edited by NorthAntrim (2013-07-29 23:55:32)
Offline
You can correct this manually, or if you are using ntpd, try
sudo ntpd -qg
To correct it manually, use
# timedatectl set-time "2012-10-30 18:17:16"
where the string in quotes is your correct local time.
Last edited by 2ManyDogs (2013-07-29 23:57:35)
Offline
2ManyDogs wrote:You can correct this manually, or if you are using ntpd, try
sudo ntpd -qg
To correct it manually, use
# timedatectl set-time "2012-10-30 18:17:16"
where the string in quotes is your correct local time.
Whoops, missed your edit.
Anyway, installed NTP and ran the command. The system time is now correct, however the hardware clock is still an hour ahead. I take it's fine to leave that since it's still counting time correctly, just an hour ahead?
Offline
Anyway, installed NTP and ran the command. The system time is now correct, however the hardware clock is still an hour ahead. I take it's fine to leave that since it's still counting time correctly, just an hour ahead?
Please post the output of
sudo hwclock --debug
and also tell me what is the correct local time when you ran the command.
Offline
NorthAntrim wrote:Anyway, installed NTP and ran the command. The system time is now correct, however the hardware clock is still an hour ahead. I take it's fine to leave that since it's still counting time correctly, just an hour ahead?
Please post the output of
sudo hwclock --debug
and also tell me what is the correct local time when you ran the command.
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375145627 seconds after 1969
Last calibration done at 1375145627 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 01:02:12
Hw clock time : 2013/07/30 01:02:12 = 1375146132 seconds since 1969
Tue 30 Jul 2013 02:02:12 BST -0.531899 seconds
The correct local time is currently 1:02, so the hardware clock is one hour ahead.
Offline
This is still not right. Your hardware clock should be set to UTC (not UTC +1). What is the output of
timedatectl status
ls -l /etc/localtime
Offline
This is still not right. Your hardware clock should be set to UTC (not UTC +1). What is the output of
timedatectl status ls -l /etc/localtime
Here's the output from a number of commands ran consecutively for comparison:
date (which gives the correct local time since running ntpd -qg):
Tue 30 Jul 01:12:18 BST 2013
hwclock --debug:
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375145627 seconds after 1969
Last calibration done at 1375145627 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 01:12:19
Hw clock time : 2013/07/30 01:12:19 = 1375146739 seconds since 1969
Tue 30 Jul 2013 02:12:19 BST -0.703819 seconds
timedatectl status:
Local time: Tue 2013-07-30 01:12:19 BST
Universal time: Tue 2013-07-30 00:12:19 UTC
Timezone: Europe/Belfast (BST, +0100)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-31 00:59:59 GMT
Sun 2013-03-31 02:00:00 BST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-10-27 01:59:59 BST
Sun 2013-10-27 01:00:00 GMT
and, finally:
lrwxrwxrwx 1 root root 34 Jul 29 20:52 /etc/localtime -> /usr/share/zoneinfo/Europe/Belfast
Thanks.
Last edited by NorthAntrim (2013-07-30 00:15:49)
Offline
OK that's just weird. timedatectl status says UTC is 00:12, but hwclock --debug says the hwclock is 01:12. And date is correct. This may be the result of some of the "hwclock --systohc" commands you ran earlier. At this point it might be time for a reboot to see if everything continues to work normally.
Offline
OK that's just weird. timedatectl status says UTC is 00:12, but hwclock --debug says the hwclock is 01:12. And date is correct. This may be the result of some of the "hwclock --systohc" commands you ran earlier. At this point it might be time for a reboot to see if everything continues to work normally.
Well, I restarted and the time went back to what it was (two hours ahead of what UTC should be.
[north@arctic ~]$ date && sudo hwclock --debug && timedatectl status && ls -l /etc/localtime
Tue 30 Jul 02:26:27 BST 2013
[sudo] password for north:
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375145627 seconds after 1969
Last calibration done at 1375145627 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 01:26:34
Hw clock time : 2013/07/30 01:26:34 = 1375147594 seconds since 1969
Tue 30 Jul 2013 02:26:34 BST -0.875549 seconds
Local time: Tue 2013-07-30 02:26:33 BST
Universal time: Tue 2013-07-30 01:26:33 UTC
Timezone: Europe/Belfast (BST, +0100)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-31 00:59:59 GMT
Sun 2013-03-31 02:00:00 BST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-10-27 01:59:59 BST
Sun 2013-10-27 01:00:00 GMT
lrwxrwxrwx 1 root root 34 Jul 29 20:52 /etc/localtime -> /usr/share/zoneinfo/Europe/Belfast
I'll run
systemctl enable ntpd
and reboot.
edit: that didn't work.
Last edited by NorthAntrim (2013-07-30 00:30:04)
Offline
ntpd will only make small corrections without the -g argument. please try
sudo ntpd -qg
and then look at the output of timedatectl status and date again.
(edit) if this does not work, you may need to set the hardware clock manually.
Last edited by 2ManyDogs (2013-07-30 00:34:43)
Offline
ntpd will only make small corrections without the -g argument. please try
sudo ntpd -qg
and then look at the output of timedatectl status and date again.
(edit) if this does not work, you may need to set the hardware clock manually.
Just done that again.
[north@arctic ~]$ date && sudo hwclock --debug && timedatectl status && ls -l /etc/localtime | tee > date
Tue 30 Jul 01:40:48 BST 2013
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375145627 seconds after 1969
Last calibration done at 1375145627 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 00:40:49
Hw clock time : 2013/07/30 00:40:49 = 1375144849 seconds since 1969
Tue 30 Jul 2013 01:40:49 BST -0.031880 seconds
Local time: Tue 2013-07-30 01:40:49 BST
Universal time: Tue 2013-07-30 00:40:49 UTC
Timezone: Europe/Belfast (BST, +0100)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-31 00:59:59 GMT
Sun 2013-03-31 02:00:00 BST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-10-27 01:59:59 BST
Sun 2013-10-27 01:00:00 GMT
Now sudo hwclock --debug gives the right time too. I'll reboot and see if that's it all fixed.
edit: rebooted. I got a boot message saying that the last changes on the hard drive were in the future, so that confirmed it before I even got to a console
[north@arctic ~]$ date && sudo hwclock --debug && timedatectl status && ls -l /etc/localtime | tee > date
Tue 30 Jul 01:43:06 BST 2013
[sudo] password for north:
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375145627 seconds after 1969
Last calibration done at 1375145627 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/07/30 00:43:12
Hw clock time : 2013/07/30 00:43:12 = 1375144992 seconds since 1969
Tue 30 Jul 2013 01:43:12 BST -0.578775 seconds
Local time: Tue 2013-07-30 01:43:12 BST
Universal time: Tue 2013-07-30 00:43:12 UTC
Timezone: Europe/Belfast (BST, +0100)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-31 00:59:59 GMT
Sun 2013-03-31 02:00:00 BST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-10-27 01:59:59 BST
Sun 2013-10-27 01:00:00 GMT
Thanks for your help!
Last edited by NorthAntrim (2013-07-30 00:44:46)
Offline
You're welcome!
Offline
What are the contents of /var/lib/ntp/ntp.drift
(it should be on the order of 10 or 20. It should not be on the order 3600000000)
If it is a really big number, delete the file.
Edit: Never mind, somehow I missed the last couple posts
Last edited by ewaller (2013-07-30 03:19:26)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Guys i found a quick way of fixing time updating. If you had like me, when you run
timedatectl
, option ,,NTP enabled'' set to NO then just turn it on like this
timedatectl set-ntp true
and it will automatically update to your configured time zone.
Last edited by nmhaker (2015-06-24 20:04:23)
Offline
Don't necrobump solved threads just to include information in the man page.
https://wiki.archlinux.org/index.php/Fo … bumping.22
Closing
Offline
Pages: 1
Topic closed