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.
1 2 3 4 5 6 7 8 |
<?php // if you need the gmt_offset then echo get_option('gmt_offset'); // if you need the timezone string use echo get_option('timezone_string'); ?> |
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.