Hi,
if the time difference is too big, NTP will refuse to touch the clock altogether. You can force an update by the '-g' option. However, the adjustment might still be slow. I'd do the following (as root):
# hwclock --set --utc --date="2014-01-14 22:05:35" # ntpd -qg
The first command manually sets the hardware clock to the approximate correct time (which you should adjust, of course). Note that the date string must specify the time in your local timezone, despite the '--utc' option.
The second command tells NTP to do a one-shot sync ('-q') and allow an initial big adjustment ('-g').
Then, for the future, just make sure you have the NTP daemon enabled to keep the clock in sync. On Debian, if you have installed the 'ntp' package, this should be fine.
Happy Hacking
Moritz
Jeroen Massar jeroen@massar.ch writes:
On 2014-01-14 21:05, I wrote:
Jeroen,
Thank you. It did that but I can't see a change.
NTP adjusts slowly, as your clock is 6+ hours off, you should force the timesync first, eg with with rdate (apt-get install rdate):
rdate -v ntp.xs4all.nl
should do the trick. Then after that make sure that ntpd is running: /etc/init.d/ntp restart
The VPS person said it is set to UTC. Previously on another VPS it was another relay in the ?circuit which had the time difference.
UTC is a timezone, and having that is great as it avoids all the pitfalls and annoyances with summer/winter time.
Note that some VPSs do not allow changing of the time, one will have to ask the host to set the time.
Do note that a VPS can be inspected and controlled easily by the Host, as such, make sure that you trust that operator.
Greets, Jeroen
Moritz and Jeroen, Thank you both.
I tried both your ideas but the system is set to prevent the time being changed as you thought. Another plea to the VPS controllers and it was corrected. So the lesson there is presume it is the VPS set-up first and foremost.
You both should know that the concise and clear advice like yours is what this list needs rather than mysterious jargon and code. Anyone finding the instructions you gave would also see the complete explanation with them.
I don't know how but it would be good to facilitate the search for or extract such advice for keen newboys. The subject line isn't always the best label as I demonstrated.
Robert
tor-relays@lists.torproject.org