This question is pure curiosity. It is easy to get a date by running the date command from bash, but it is an external executable and requires spawning a subpro
bash 4.2 introduced a new specifier for printf; this was extended in bash 4.3 to use the current time if no argument is given. %()T expands to the current time, using the format appearing inside the parentheses.