OPNsense Forum

English Forums => General Discussion => Topic started by: EagleRichard on July 14, 2023, 01:11:58 PM

Title: [SOLVED]SystemTime is not correct
Post by: EagleRichard on July 14, 2023, 01:11:58 PM
Hey all,

I've noticed one of out Firewalls is showing the wrong time, it's 20 minutes fast
(see attached screenshot)

I've tried changing the Timezone, rebooting the device,and manually setting the time through SSH
so far, no success
Title: Re: SystemTime is not correct
Post by: bartjsmit on July 14, 2023, 01:32:06 PM
Services: Network Time: General

Set your preferred NTP time anchors (e.g pool.ntp.org), save, adjust the clock to within a minute and start the service.

Bart...
Title: Re: SystemTime is not correct
Post by: CJ on July 14, 2023, 03:05:18 PM
Also, check to make sure that your clock is staying synced.  Even if you have NTP configured your clock can drift too much and cause issues like this.

If that's the case you'll need to change your clock implementation with a tuneable.
Title: Re: SystemTime is not correct
Post by: EagleRichard on July 18, 2023, 10:56:18 AM
Quote from: bartjsmit on July 14, 2023, 01:32:06 PM
Services: Network Time: General

Set your preferred NTP time anchors (e.g pool.ntp.org), save, adjust the clock to within a minute and start the service.

Bart...

First place I looked.

Quote from: CJ on July 14, 2023, 03:05:18 PM
Also, check to make sure that your clock is staying synced.  Even if you have NTP configured your clock can drift too much and cause issues like this.

If that's the case you'll need to change your clock implementation with a tuneable.

your reference to Drifting made me curious.
I also found the solution:

sudo ntpdate -u time.google.com

this reset the 'drift' from -12xx to +.00005

Thanks for your input guys!
Title: Re: SystemTime is not correct
Post by: CJ on July 18, 2023, 01:27:48 PM
Quote from: EagleRichard on July 18, 2023, 10:56:18 AM
Quote from: CJ on July 14, 2023, 03:05:18 PM
Also, check to make sure that your clock is staying synced.  Even if you have NTP configured your clock can drift too much and cause issues like this.

If that's the case you'll need to change your clock implementation with a tuneable.

your reference to Drifting made me curious.
I also found the solution:

sudo ntpdate -u time.google.com

this reset the 'drift' from -12xx to +.00005

Thanks for your input guys!

That's not a solution.  You just did a one time forced update.  Your clock will continue drifting.  You need to look at your available options and set the kern.timecounter.hardware tuneable to a proper value.