Time sync problem


#1

Hi there,

I am new to TrueOS, I just successfully installed the desktop, but I find the time clock is set to UTC although it said my local time zone, I believe ntpdate is the one to use and it is set to ‘false’ in both running and boot, so I changed that to ‘true’ and reboot, but still the same the time clock won’t sync. it still stick with UTC, why is that ? and how do I force the sync ?


#2

I have the same problem. I did the trick in the “Tips” section, which works for the current session, but at next boot the problem returns. I encountered this problem at times on Linux as well and there was a fix for it on the Ubuntu site, but I am doubtful it would work here.


#3

Just had a thought (a dangerous event for a newbie). Why not open the service manager and make sure the time service is set to run on boot? (Control Panel/Service Manager/openntpd - make “start on boot” true. Just did it on my system; I’ll know next boot if it worked or not.


#4

From the command line try the FreeBSD command :

$ sudo tzsetup


#5

I have now booted twice since enabling openntpd in Service Manager, and both times it boots up with correct time now. so that works, at least on my computer.


#6

Unfortunately, third not a charm, it’s back to being 4 hours ahead. I’m going to go into my CMOS to see if it’s set to universal or local time.


#7

open a terminal and type date?

what does it say?

also check out this --> “https://www.cyberciti.biz/faq/howto-set-date-and-time-timezone-in-freebsd/


#8

Hi Rod, it says: Sun Jun 17 22:18:02 EDT 2018


#9

what is it supposed to say?


#10

It’s actually 4:20 pm here.

Woops, make that 6:20 pm


#11

BTW my computer is set to universal time


#12

read the link I sent. it “should” help get the time set properly or at least close enough.


#13

thanks, I’ll give it a go. I made a mistake above - it’s actually 6:20 pm.


#14

I’m in the same time zone.


#15

ok, based on the info in the link, I set it correctly (1806171835). Now, hopefully it will stay fixed!


#16

then type date, again to verify


#17

yeah, it is still correct.
I learned something useful just now. some people put in a #, some a $, and I sometimes copy that when doing a command. Which messes things up. Also, I need to keep in mind that sudo is for when root is required, right? but what about su? I’ve always been confused about that.


#18

See you later, gotta go eat dinner.

Also: I did Maurizios’s suggestion and set time xone from command line, that seemed to work out ok.


#19

Read this but don’t change this:

$ cat /etc/defaults/rc.conf | grep ^ntpd_[es]
ntpd_enable="NO"                # Run ntpd Network Time Protocol (or NO).
ntpd_sync_on_start="NO"         # Sync time on ntpd startup, even if offset is high

Now, set both of these to YES instead of NO.

You have to this in “/etc/rc.conf.local” or in “/etc/rc.conf”. Try “/etc/rc.conf.local” first.

Then: Reboot. Then: Check with “date”-command.


#20

Thank guys for the tips, hope this will be included in the update !