Weird time problem

General questions.
Post Reply
User avatar
Deepcuts
Posts: 459
Joined: March 1st, 2016, 3:18 pm
Location: Romania

Weird time problem

Post by Deepcuts » January 8th, 2019, 3:09 am

My timezone is Europe/Bucharest (GMT+2)
BIOS time is 04:00:00
IPFire is starting and I can read some error regarding "last mount time is in the future"
I can also see the message:

Code: Select all

Setting system clock...
Tue Jan 8 06:01:00 EET 2019
6 AM, that would be 2 hours ahead of the real time.

I login and I issue "date", which return the correct time and date: Tue Jan 8 04:01:20 EET 2009
I double check the timezone with setup and it is set correctly already.
I reboot the machine, enter BIOS and see that the clock is now set 2 hours behind the real time (02:03:00)/behind what was set before in BIOS.

Code below is from 05:06 AM

Code: Select all

[root@ipfire ~]# hwclock --debug
hwclock from util-linux 2.28.2
Using the /dev interface to the clock.
Last drift adjustment done at 1546916409 seconds after 1969
Last calibration done at 1546916409 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2019/01/08 03:06:19
Hw clock time : 2019/01/08 03:06:19 = 1546916779 seconds since 1969
Time since last adjustment is 370 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2019-01-08 05:06:18.778635+2:00

Code: Select all

[root@ipfire ~]# hwclock --show
2019-01-08 05:06:45.794391+2:00

Never experienced such behavior.
Anyone has any clue what might cause this?
I do not dual boot with windows. It is a standalone machine that acts only as a router.
Image
Image

User avatar
Deepcuts
Posts: 459
Joined: March 1st, 2016, 3:18 pm
Location: Romania

Re: Weird time problem

Post by Deepcuts » January 9th, 2019, 12:19 am

Found a fix.
Edit /etc/init.d/setclock
The 3rd line should be CLOCKPARAMS=
Modify the line to CLOCKPARAMS=--localtime

Now the time is the same and correct everywhere. Even in BIOS.
Image
Image

Post Reply