In this answer, I have shared how to get current date and time in WordPress? Add the following code to the functions.php file of your current activated WordPress theme.
// if you need the gmt_offset then
// if you need the timezone string use
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.