Time is always wrong

RogellParadox

New Member


Messages: 10

I have been having a real bad time trying to fix the time. I have a multiboot and you all know how messed up it gets when multibooting.
My timezone is GMT -3. So, for instance, it was supposed to be like this
Code:
qua  1 dez 2021 10:19:52 -03

and not like this
Code:
qua  1 dez 2021 13:19:52 -03

Yes, I tried tzsetup, tons of times, never works for nothing.
Tried cp /usr/share/zoneinfo/Region/City /etc/localtime and also didn't work
Tried "RealTimeIsUniversal"=dword:00000001 on Windows (It was already set before) and nothing helps.
Tried using NTP and Plasma's NTP, but I don't want to use NTP again because it always messes Windows' time - also when I use NTP and block Window's automatic time update, if I spend some time on FreeBSD and go back to Windows, it's like time had stopped. (Example: I boot Windows at 09:00, reboot on FreeBSD, spend some good 25 minutes on it. Reboot on Windows. Instead of 09:25, it would show me 09:00 - the very first time before booting up FreeBSD).

I know I fixed it long time ago without having to mess with the mentioned above but I can't remember how I did it.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,071
Messages: 39,685

If you dual boot with windows, run tzsetup(8). Do NOT pick YES when asked if the CMOS clock is running UTC, make sure you set this to NO. Windows assumes your CMOS clock is running on local time.
 
OP
RogellParadox

RogellParadox

New Member


Messages: 10

OP
RogellParadox

RogellParadox

New Member


Messages: 10

I did and I'm telling you how to fix it. It's fine if you just want to ignore it.

Yes, it works so good that time keeps wrong.
Do you think I haven't tried tons of "solutions" I searched on this forum, Reddit and so on?
If you don't really want to help, why bother commenting?
 

Menelkir

Well-Known Member

Reaction score: 413
Messages: 356

Then keep your time as UTC and make windows work with UTC:
Code:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

Update: Nevermind, I say you already tried that. I think you have a hardware issue.
 
OP
RogellParadox

RogellParadox

New Member


Messages: 10

Then keep your time as UTC and make windows work with UTC:
Code:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

It's also said in my first post I tried that and Windows is still forcing its time settings

Code:
Tried "RealTimeIsUniversal"=dword:00000001 on Windows (It was already set before) and nothing helps.

Seriously...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,071
Messages: 39,685

Example: I boot Windows at 09:00, reboot on FreeBSD, spend some good 25 minutes on it. Reboot on Windows. Instead of 09:25, it would show me 09:00 - the very first time before booting up FreeBSD
Timezones don't work in 25 minute time frames. The timezone is not the issue here. Neither is NTP because that also doesn't cause a 25 minute time difference. Either your CMOS clock is broken or you are using some really dodgy time servers.
 

Menelkir

Well-Known Member

Reaction score: 413
Messages: 356

It's also said in my first post I tried that and Windows is still forcing its time settings

Code:
Tried "RealTimeIsUniversal"=dword:00000001 on Windows (It was already set before) and nothing helps.

Seriously...
"Seriously" you also didn't read my update line. 😛
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,071
Messages: 39,685

If you have set Windows to use UTC then make sure to answer YES to the UTC question from tzsetup(8).
 

bakul

Active Member

Reaction score: 90
Messages: 164

Tried using NTP and Plasma's NTP, but I don't want to use NTP again because it always messes Windows' time - also when I use NTP and block Window's automatic time update, if I spend some time on FreeBSD and go back to Windows, it's like time had stopped. (Example: I boot Windows at 09:00, reboot on FreeBSD, spend some good 25 minutes on it. Reboot on Windows. Instead of 09:25, it would show me 09:00 - the very first time before booting up FreeBSD).
Did you try touch /etc/wall_cmos_clock? And don’t block Windows auto time update or ntp.
 

gpw928

Aspiring Daemon

Reaction score: 294
Messages: 640

Have you tried forcing the date to be set when you boot:
Code:
[f13.130] $ grep ntp /etc/rc.conf
ntpdate_enable="YES"
ntpd_enable="YES"
This should cover a range of maladies, including motherboard battery problems.
 
OP
RogellParadox

RogellParadox

New Member


Messages: 10

Replace your CMOS battery

There's nothing wrong with my CMOS battery. I have a multiboot and set NTP. As I said, after quitting FreeBSD and going back to Windows (also tried with my Hackintosh) time is messed up and takes some while to be synced. A problem that shouldn't exist if I wasn't forced to use NTP.
 
OP
RogellParadox

RogellParadox

New Member


Messages: 10

Timezones don't work in 25 minute time frames. The timezone is not the issue here. Neither is NTP because that also doesn't cause a 25 minute time difference. Either your CMOS clock is broken or you are using some really dodgy time servers.

It was simply an example, I didn't mention a timezone at all. Activated NTP and it happened just as I said (also like I just mentioned in the comment above)
Here it does cause something, as if, after NTP is activated, Windows (and other systems) couldn't count the time spent on FreeBSD and would show the wrong time.
 

gpw928

Aspiring Daemon

Reaction score: 294
Messages: 640

after quitting FreeBSD and going back to Windows (also tried with my Hackintosh) time is messed up
What happens if you shut down Windows (power off) for some time and reboot Windows? Does Windows show the correct time immediately after booting?

[Using NTP is not going to corrupt the motherboard clock! If any O/S has the wrong time, then you have a flat battery, broken hardware, set the time wrongly, or O/S mis-configured.]
 

vigole

Daemon

Reaction score: 1,600
Messages: 1,413

A temporary solution:

Open an elevated PowerShell
C:> powershell.exe -Command "Start-Process cmd -Verb RunAs"

Change the w32time service to automatic:
PS> sc config w32time start=auto

Reboot the PC:
PS> shutdown /r
 

mark_j

Daemon

Reaction score: 795
Messages: 1,371

It may be the preferred method but I'm fairly certain bsdinstall writes that out when you select ntpdate as a post install option.
I'm quite prepared to be wrong, though.
 
Top