Formatted Date Strings in Linux
You can easily print the current time as a formatted string using the date command in linux:
date "+%Y-%m-%d %H:%M:%S %z"
The result of this command looks like this:
2017-12-12 10:37:30 -0700
The other format place holders are described in the date manual page:
man date