/** * get_valid_timezone_string * * ensures that a valid timezone string is returned * * @access protected * @param string $timezone_string * @return string * @throws \EE_Error */ public static function get_valid_timezone_string($timezone_string = '') { // if passed a value, then use that, else get WP option $timezone_string = !empty($timezone_string) ? $timezone_string : get_option('timezone_string'); // value from above exists, use that, else get timezone string from gmt_offset $timezone_string = !empty($timezone_string) ? $timezone_string : EEH_DTT_Helper::get_timezone_string_from_gmt_offset(); EEH_DTT_Helper::validate_timezone($timezone_string); return $timezone_string; }