M
M
Mikhri2020-08-26 17:52:47
Iron
Mikhri, 2020-08-26 17:52:47

The computer, regardless of the OS, lives according to UTC, spitting on the BIOS time. And the BIOS itself is reset if you turn off the power of the PC (the CR2032 changed three times). Any ideas?

It all started with what I discovered: the php-function time () gives me not the system time, as it should, but pure UTC, although I am at +2.
Those. the output of time() on the system matches what unixtimestamp.com says in The Current Unix Timestamp. Although UTC + 2 is set everywhere in the system, and the BIOS time also corresponds to it.

At first I played with the system settings in different ways (Windows 10): enabled / disabled auto-sync and changed its servers, perverted with time zones in every way and simply cut off all automation, setting the date / time manually.
Nifiga.

I already thought that the problem is in the server settings or php itself.

But then I remembered that I still had time glitches on Windows 7. And even when I needed Linux, I also had jambs in Mint over time: it jumped, if I remember correctly, for 2 or 3 hours, and into the future.

Those. The problem is not exactly in the system, but somewhere at the near-iron level.

There is still a moment: when the power is turned off, the BIOS settings are reset, incl. time.
And three consecutive battery replacements did not solve this problem.
Perhaps it is somehow related.

The rest of the car feels great. At the same time, from the system time functions, it is enough for me that it is correctly displayed in the corners of the monitors (autosync solves this problem on its own), and turning off the power and resetting the BIOS is not terrible for me, because. connected via UPS.

Those. The bug doesn't really interfere with life.

But it's interesting to get to the bottom of it.

What are some ideas?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Viktor, 2020-08-26
@Mikhri

It is necessary (I’m not afraid of this word) to measure the current consumed by the system clock from the 2032 tablet. Just take a multimeter like this, set it to measure microamps, and include it in the wire gap that connects this tablet, pulled out of its socket. The presence of the problem described in the question will be confirmed if this current is zero.
But there is a nuance here: the standard current consumption from 2032 is very small (negligible fractions of a microampere), and not every multimeter will reliably distinguish it from zero - the current may be below the sensitivity threshold of the device or its measurement error.
One of the reasons for not consuming current may be the absence (banal loss) of a jumper on the motherboard, with which the BIOS / clock settings are reset. If the jumpers on the motherboard are not signed, then a drawing in the technical description of this motherboard can help you find it.

Y
Yan, 2020-08-26
@Slayer_nn

There is still a moment: when the power is turned off, the BIOS settings are reset, incl. time.
And three consecutive battery replacements did not solve this problem.
Perhaps it is somehow related.

Yes, even with the battery removed. Until you unplug the power cable from the outlet, the BIOS should save its settings.
And since you changed the battery three times, then yes, something is not working somewhere in the line
. You need to call. It will not be possible to immediately determine the time . You
can solve the problem with time by adding a synchronization task to the scheduler
during PC startup, logging in the user, etc.
But with bios settings this will not work

K
kisaa, 2020-08-27
@kisaa

Ubuntu (or other similar) is not the second system? By default, it stores iron clocks in UTC, and when you reboot from one system to another, there will be a similar jump.
Of course, if the time always resets to 00:00 on January 1, then the problem is somewhere in the hardware.

V
VT100, 2020-08-27
@VT100

Did the RealTimeIsUniversal key get stuck in the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" registry key ?

M
Maxim Moseychuk, 2020-09-14
@fshp

Have you even looked at the documentation? https://www.php.net/manual/ru/function.time.php
time just returns the time in unix time, which is not tied to zones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question