How to get WordPress Time Zone setting?

if you need the gmt_offset then

<?php echo get_option('gmt_offset'); ?>

this will give you an integer like 2 or -2.

and if you need the timezone string use

<?php echo get_option('timezone_string'); ?>

this will give you a string like America/Indianapolis

Leave a Comment