Do you remember that motherboard has CR2032 battery?
Problem:
Windows cannot boot up. After start of computer there is information:
Time-of-day not set - please run SETUP program.
Then on Windows boot screen animation only two dots can appear on screen, then computer restart itself over and over again.
Computer: Dell Optiplex 990 SFF with Windows 7.
Solution:
Here are two problems:
- Time-of-day is not set.
- Windows cannot boot.
Both problems are results of dead CR2032 battery on motherboard.

If you are not aware: this battery is responsible for providing power to keep information about date and BIOS settings when computer is shut down. If it dies then all settings are forgotten and set back to default values.
So first you need to replace it with new one. Below you can find location of this battery on motherboard:

When battery is replaced then it's time to fix this two problems.
Solution for the first one is just setting up date and time in BIOS. To achieve this you need to first press F2 key on computer startup to get into BIOS. Then in Settings -> General -> Date/Time set proper date and save settings. After exiting BIOS you shouldn't see error message again.
Second problem occurs, because default settings of SATA operation is set to 'RAID On' and your drive/operating system do not support RAID mode. Then you need to boot to BIOS once again and change Settings -> System Configuration -> SATA Operation to 'AHCI'. After saving settings and leaving BIOS computer should work like a charm.

Story:
One day when I visit my parents house dad ask me to check his computer, because Windows didn't want to start.
His computer was bought post-leasing from company where I work 2 years ago so it is around 7 years old.
When I tried to turn it on, I saw message that Time-of-day is not set. So my first thought was 'CR2032 battery on motherboard is probably dead, because it's about time'. And as you see - first thought was right.
Then I waited for start of Windows to see if date was really reset to default value. After couple of second computer restarted itself when Windows animation appeared. That was weird... I tried once again - same result.
Then I booted to BIOS just to change date and see if this can help. In BIOS date was set to 2017-05-05 so theory with battery was right. Unfortunately this operation didn't change anything - computer still was restarting itself.
Dell diagnostics tools showed that everything with computer is fine.
Next idea was to start Windows in safe mode, but loading process hanged on loading file:
C:\Windows\System32\drivers\aswArDisk.sys
and computer again was restarting itself.
Automatic tools for repair Windows boot didn't find any problems.
I was really confused what was going on. Once I thought that this is problem with failed Windows update, then it was virus, but after finding out that aswArDisk.sys is Avast Antivirus file I was blaiming it.
Fortunately I had bootable pendrive with Ubuntu 18.04 and it was working like a charm. So it was sure that this is software problem - not hardware.
Using Ubuntu I renamed aswArDisk.sys and another Avast files like i.e. awsbidsha.sys to have format *.xxx.
Then boot in safe mode hanged on file:
C:\Windows\System32\drivers\classpnp.sys
After reading some forums solutions on similar problems, one guy wrote something about AHCI. And then just from nowhere I remembered that some time ago I was forced to change SATA operation in BIOS to AHCI during installation of Windows 7 on same Dell Optiplex 990.
And that is how I get solution for this problem :)