# System time changed by itself



## drhowarddrfine (Oct 7, 2014)

On FreeBSD10, I've been running a server on a KVM for about six months or so and a couple of days ago, the system time moved forward two hours. I think I noticed this last Spring when our clocks roll forward but it's too soon for the clocks to roll back for "daylight savings time" and that change should only be one hour. 

I do have America/Chicago as my timezone in /etc/localtime and a `zdump` shows the time change for November 2nd. So is there something with ntpd() causing this? Don't know.


----------



## max21 (Oct 9, 2014)

I was wondering if anyone seen this type of problem.  Here’s my story but every event may not be the exact way.  I been trying to understand why for months and only accidently fix something without knowing it or did not.  I don't even know where the problem came from; out the box, while ssh'ng ports, or what.

First I thought it was a GNOME issue because the time would show 2 hours behind or ahead (i forgot) of my time set in the BIOS.  After a re-set it would keep coming back after reboot, and stay there.  I learn to live with it.  No ntpd installed and I don’t use it.  I only connect to FreeBSD to install ports and then I pull the internet cable when finish because this machine is not internet ready yet.  It is not a play toy to play guesting games with.  I plan for it to be a secure workstation to connect to remote server someday.

Anyway, I have not been connected to FreeBSD to install anything for a over a week and my time is as of now correct under GNOME.  I think how I fix last week was to pop the battery out the machine 
to drain the BIOS than I reset time and everything else, than GNOME displayed the correct time but it did not help VirtualBox.

That was the other strange thing that been going on since day1 as above; under Virtualbox the time was always ahead or behind by behind hours (I forgot).  But when I set correct time to Windows-XP
and Windows-7 the new time would only keep for a next few seconds after clicking OK than pop back again to the wrong time.  Time zone is unchecked and Internet Time is un-checked for both Windows versions.  It make no since.  I just checked again after reading this thread and Windows time now stay one-hour behind time no matter what I do.

After fixing GNOME time with BIOS (I think???) than I blame VirtualBox. I said nothing since the question would have not been FreeBSD specific or just overlooked because I would not know how to explain it, not knowing where to begin.  For example, I never thought about ntpd.

All I know is my BIOS had the correct time when I installed FreeBSD-10.0 and everything else within days.  I set UTP eastern time and I never used ntpd.  Maybe it’s safe to guest is it’s a bug, I
just don’t know if connecting to freebsd-update or ports had anything to do with it.  Maybe there is a ntpd leak (forcing usage of ntpd) or it could be a stand-along 10.0 problem.  Who knows?  I live it for nearly two months in hop that next version works by accident.


----------



## Oko (Oct 10, 2014)

Clock drifting is known phenomenon for visualization of any kind as well as the sign of failing hardware. Do you guys have time synchronization daemon on in your KVM (VBox) guests? What about hosts? Another info. Could you please list your time server pool. I had security alerts caused by relativistic effect (yes as in Theory of Relativity) while using remote server for time synchronization. Also be aware that Windows incorrectly uses local instead of UTC as a system time as many Linux distros.
That typically causes UNIX to drift for the time difference between UTC and local time zone.


----------



## max21 (Oct 10, 2014)

@drhowarddrfine's expectations are far deeper than mine, but I will be googling about the things you suggested.  It's all above my knowledge of FreeBSD 

I remember running PC-BSD 8.2 and 9x many months ago, but I was very unhappy that I could not install VirtualBox on my own (it was really the beginning of it _all_). With VirtualBox included under PC-BSD (if I remember correctly) it never had a time problem back than. I wish I had the time, and _will_, to install PC-BSD 10.0 the same way, but I don't because I'm happy with what FreeBSD, SVN and, rest who made it all happen without flaws since this new version.

I figure: parts or most of the answer can be found by comparing PC-BSD. I bet PC-BSD 10.0 doesn't have that problem, and if it does than it's a bug, and if that is not the case than I I bet you are correct about Albert Einstein's theory of relativity. As we all know, PC-BSD can get the job done as good, if not better than Windows or Linux because we can tweak FreeBSD. Straight-FreeBSD is for explorers and maybe it will be around for the next 10,000 years just like aforementioned. What came first, the chip or the onion ring?

Anyway, if by Einstein's theories can't be solved, instead of polluting the space-and-time effect, I'll figure out a way to  write a fix-hour(s)script or program since the minutes and seconds are in tack for what I seen under this ghost for the host. If I am crazy, please don't change me now!


----------



## drhowarddrfine (Oct 11, 2014)

Oko said:
			
		

> Do you guys have time synchronization daemon on in your KVM (VBox) guests? What about hosts?


This is a rented VPS that's running CentOS so I have to ask but I am running ntpd.  


> I had security alerts caused by relativistic effect (yes as in Theory of Relativity) while using remote server for time synchronization.


I'd rather leave my relatives out of this.


> Also be aware that Windows incorrectly uses local instead of UTC as a system time as many Linux distros.


I would never stoop to that level.


> That typically causes UNIX to drift for the time difference between UTC and local time zone.


The problem is, this was an overnight switch, not drift, of two hours. I noticed when my system reporting and security emails were being sent earlier in the day than usual.

I had the system clock set to my local time zone rather than the time zone of where the server is located. Could that be the issue? This new host is the first one I've ever used that wasn't in the same zone I'm in.


----------

