Sketch does not update LCD properly - Solved

@PaulRB
Thank you for your reply.

I think you are updating the LCD too frequently. Is it updated
each time loop() runs, even if the time has not changed.

Yes.
Now, when I had only seen the mail notification about your reply, I changed to:

if (timeStr != oldTimeStr) {  //Avoid unneeded display update
    lcd.setCursor(4, 0);  // (position,line)
    lcd.print(timeStr);
    lcd.setCursor(3, 1);
    lcd.print(dateStr);
    oldTimeStr = timeStr;
  }

and that shows that you are right.

Please always click Auto-Format in the IDE menu before
you post your code

Ok. I was not aware of that function.

I need more time to study the other suggestions you made.
Thank you.