Can someone tell me how to get the time zone that is set in the WordPress Admin?
For example, if the blog is set to Eastern time, I need this exact string to print out:
US/Eastern
This is for a function that lives in functions.php in my theme.
|
|
|
if you need the gmt_offset then
this will give you an integer like 2 or -2. and if you need the timezone string use
this will give you a string like America/Indianapolis |
|||
|
|
|
Check the Option Reference page. The option |
|||
|
|
|
Don't think you're gonna get a string like US/Eastern without storing all the strings you want in an array and referring to them. Using PHP you can get the timezone abbreviation, ie EST; and if you have those values stored in an array with the strings you want, you can look them up.
|
|||
|
|