# Date time in two rows in Italian format and time zone

I have now created this MWE:

\documentclass[12pt,margin=3mm]{standalone}
\usepackage{newtxtext}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{datetime2}
\usepackage{fontawesome5}

\begin{document}
\begin{tikzpicture}
\draw (0,0) node[minimum size=4cm,draw=red!60,circle,line width=2mm] {\large\textbf{\DTMnow}};
\node at (0,1) (A) {\textcolor{Green}{\Large \faCheckCircle}};
\node at (0,-1) (B) {\large \textsc{Approved}};
\end{tikzpicture}

\end{document}


with this output:

Using datetime2 package, how I can this italian date structure?

• You can use \DTMsetdatestyle{ddmmyyyy} to change the date from "year-month-day" to "day-month-year". How exactly should the "time" part look like? – leandriis Oct 17 '20 at 21:13
• Is this the output you want to achieve? i.stack.imgur.com/79Sxr.png – leandriis Oct 17 '20 at 21:19
• @leandriis Very kind hours, minutes and seconds in Italian time. Thank you for your interest.....For your 2nd comment the image it is perfect! – Sebastiano Oct 17 '20 at 21:20
• So, basically like the following? i.stack.imgur.com/nFsb3.png – leandriis Oct 17 '20 at 21:21
• @leandriis Perfect! Here in Italy are the 23:23 (pm). – Sebastiano Oct 17 '20 at 21:23

Probably this is not the most elegant solution, but you can use \DTMtoday and \DTMcurrenttime instead of \DTMnow and add the options text width=3cm and align=center to your node. In order to change the date format, you can use \DTMsetdatestyle{ddmmyyyy}. If you also want to get rid of the seconds, add the package option showseconds=false to the datetime2 package.

Full example:

\documentclass[12pt,margin=3mm]{standalone}
\usepackage{newtxtext}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{datetime2}
\usepackage{fontawesome5}

\DTMsetdatestyle{ddmmyyyy}

\begin{document}
\begin{tikzpicture}
\draw (0,0) node[minimum size=4cm,
draw=red!60,
circle,
line width=2mm,
text width=3cm,
align=center]
{\large \bfseries \mbox{\DTMtoday} \DTMcurrenttime};
\node at (0,1) (A) {\textcolor{Green}{\Large \faCheckCircle}};
\node at (0,-1) (B) {\large \textsc{Approved}};
\end{tikzpicture}
\end{document}


Here is another version using the italian localization module.

\documentclass[12pt,margin=3mm,italian]{standalone}
\usepackage{newtxtext}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage[useregional=numeric,showseconds=true,showzone=false]{datetime2}
\usepackage{fontawesome5}

\begin{document}
\begin{tikzpicture}
\draw (0,0) node[minimum size=4cm,
draw=red!60,
circle,
line width=2mm,
text width=3cm,
align=center]
{\large \bfseries \mbox{\DTMtoday} \DTMcurrenttime};
\node at (0,1) (A) {\textcolor{Green}{\Large \faCheckCircle}};
\node at (0,-1) (B) {\large \textsc{Approved}};
\end{tikzpicture}
\end{document}

• Thank you very very much. Why is it not elegant solution? Why I have 21:27 like a time instead of 23:27? – Sebastiano Oct 17 '20 at 21:28
• I have put the \usepackage[showseconds=true]{datetime2} and not false, and now I see the seconds :-)...but the hour in Italy is 23:56. But it's not that I have the wrong time zone? :-) :-) How fix it? – Sebastiano Oct 17 '20 at 21:57
• @Sebastiano - Is your system maybe configured to show GMT (Greenwich mean time) instead of local time? Or is it just a coincidence that the difference between the two times is currently 2 hours? – Mico Oct 18 '20 at 5:54
• @Sebastiano: Regarding the seconds not showing up: Which compiler did you use to compile the example document? I used PDFLaTeX and get the seconds by default. With XeLaTeX on the other hand, seconds are omitted by default and can be shown upon using the showseconds=true package option. – leandriis Oct 18 '20 at 11:02
• @leandriis Hi. Last night I went to sleep at 1:30 am reading the manual and I have make many compilations. I had tried also with singolar option or double options for the datatime2 without a solution. I have understood only a few minutes ago that the reason of the hour in Italy is not to have used my updated MikTeX but Papeeria, an online editor more fast of MikTeX on this OS W7 32-bit. Papeeria use TeXlive2019. I often use pdfLaTeX and very very few the others engines. However your solution it is correct: i.stack.imgur.com/5jsol.png :-( excuse very much. – Sebastiano Oct 18 '20 at 11:33