Time is always wrong

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.
 
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?
 
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.
 
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...
 
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.
 
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. 😛
 
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.
 
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.
 
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.
 
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.
 
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.]
 
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
 
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.
 
Back
Top