You are not logged in.
Pages: 1
Every time ntpd synchronises with the network, the local time is displayed 4 hours earlier than what should be displayed. This seems to be because the UTC clock is being set to local time, so to correct for the timezone, the software 'local' time is being set 4 hours before *that*.
So, how do I configure ntpd to read universal time so that my local clock displays the correct time?
Here's what timedatectl gives me:
Local time: Thu 2013-06-06 12:55:23 EDT
Universal time: Thu 2013-06-06 16:55:23 UTC
RTC time: Thu 2013-06-06 16:55:23
Timezone: America/Toronto (EDT, -0400)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-10 01:59:59 EST
Sun 2013-03-10 03:00:00 EDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-11-03 01:59:59 EDT
Sun 2013-11-03 01:00:00 EST
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
"UTC clock is being set to local time" doesn't make sense to me - do you mean the hardware clock?
Offline
ya, it's kind of confusing... my hardware clock is set to local time, and in this case, local time is 4 hours before what it should be. timedatectl shows Universal time as being set to local time for some reason (in this case 16:55:23), and therefore my 'local time' is 4 hours before what it should be reading.
So, basically: universal time to my computer is being set to local time, and local time is accordingly behind.
Last edited by kev717 (2013-06-06 21:11:26)
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
Can you set your hardware clock to UTC?
Offline
Ah! There it is -- running 'hwclock -u' appears to have resolved the problem (for now at least).
thanks.
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
Reboot and see :-)
If you're not dualbooting Arch with e.g. Windows, there should be no reason to keep your hardware clock in localtime: https://wiki.archlinux.org/index.php/Time#Time_standard
Offline
Well, currently I'm triple-booting between Arch, an older version of Arch that has hardware acceleration for my video card (for gaming), and a debian-based distribution that I never really use anymore anyway (I'm thinking of switching that one over to a third arch distribution which I would use for proprietary programs)
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
Doesn't seem to have stayed after rebooting -- running 'hwclock -u' doesn't help this time.
Hardware clock is 4 hours behind local for some reason, whereas it should be in UTC (4 hours ahead of local)
Currently, here, local time is 19:53:53. Here's what timedatectl gives me:
Local time: Fri 2013-06-07 15:53:53 EDT
Universal time: Fri 2013-06-07 19:53:53 UTC
RTC time: Fri 2013-06-07 19:53:53
Timezone: America/Toronto (EDT, -0400)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2013-03-10 01:59:59 EST
Sun 2013-03-10 03:00:00 EDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2013-11-03 01:59:59 EDT
Sun 2013-11-03 01:00:00 EST
and hwclock -u
Fri Jun 7 15:53:55 2013 -0.375693 seconds
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
This solved most of my issues with ntp:
Make sure that your /etc/locale.conf is properly set
(When I set my locale.conf the second time using 'echo LANG=en_CA.UTF-8 > /etc/locale.conf' It did transfer the LANG= portion. When I last had problems with this my locale.conf was empty
If you can set your software clock correctly either by synching it with an ntp server or through another means, you can copy those changes to your hardware clock with this command:
sudo ntpdate 0.ca.pool.ntp.org #get correct time from ntp server
hwclock --systohc # copy software clock to your hardware clock
rebootOffline
Pages: 1