Is there a way to check if the RTC has started in order to wait until it has?
I’m not so sure that it is a question of time because I have done a test in the Setup doing a loop to wait for minutes and printing the date and it has not synchronized
But it does perfectly when it is out of Setup and into the Loop.
I tried checking the RTC status but in the Setup it seems never to get into sync.

'1. Knock up a new project with just the RTC widget sketch and you should find for most systems the time will update immediately. In the old days you had to use setInterval and other tweaks but these days that is almost redundant.

'2. From what you learnt in 1. ensure you put everything in the same sequence in your real project. Declarations and setup() positions the same. Most projects should get the time immediately if you follow the same sequence.

'3. Reasons time doesn’t update immediately are because you haven’t followed the right sequence or you have clogged up setup() with syncAll, too many sequential virtualWrite() or syncVirtual() calls etc.

'4. When Blynkers add the RTC widget it’s normally because they want to do something at timed intervals. One thing you should do is call the 1970 check at say 10 or 20s intervals BUT NOT with a while loop. Use Blynk’s SimpleTimer as while statements should generally be avoided.

I believe Blynk’s version of SimpleTimer is specified for > 10ms so I wouldn’t go down to 1ms.

There’s no reason you can’t call dht.begin before the Blynk connection. In fact I would always call it first.
Never seen Blynk.run() and timer.run() in setup(), remove them. As stated previously remove the while(year() == 1970) call.

Then just comment out other items of setup() until you find what is stopping the RTC sync.

And it just works… if you are having issue where your code seems to run quicker than the RTC syncs, why not just simply delay for a short moment in the setup before continuing on? (NOTE, since this delay is right after Blynk.begin() it could cause connection issues, but if it is only called once and is no more than 1 second, it should be OK)

Blynk.begin(auth, etc);
rtc.begin();
delay(1000); // give RTC a second to sync up

With my complete code I still need some tweaking.
As recommended by @Costas I have moved dht.begin before Blynk connection, of course removed the while loop and… I don’t get the RTC started in the setup if I don’t call Blynk.run() at least 4 times.
The RTC is started after some loops if I don’t call Blynk.run() any time in the setup.

@GunnerTechTools Even though the 4 Blynk.run() calls take less than 2 millis in being executed, substituting them by a delay(1000) or even a delay(5000) does not help in getting the RTC started… and the clear recommendation is not to use delay with Blynk.

It seems to me that it is not a matter of time or delays, but a matter of calling Blynk.run() some times.

So I get the intended result of having the RTC started in the setup in order to be able to time-stamp messages sent from the setup by calling Blynk.run in the setup several times… but I don’t understand the rationale behind it.