I would like to display current date and time to the header section.
I am using a subtheme of Bartik. Any suggestions?
You can also add code page.html.twig
as well.
For print only date use {{ "now"|date("m/d/Y") }}
More Details
I can't comment directly on Smalution's answer, but can confirm that
{{ "now"|date("m/d/Y") }}
in twig DOES respect drupal user timezones. (Tested it in america/new york - 2:50, switched to america/edmonton - 12:50) as per mpdonadio's question.
For this you can create custom block and insert the PHP date function in it. (Install PHP module for insert php code in block or drupal site). Place this block on the header or where you want to place.