}
require_once ($cmsRootPath . DIRECTORY_SEPARATOR . 'wp-load.php');
+ $wpUserTimezone = get_option('timezone_string');
+ if ($wpUserTimezone) {
+ date_default_timezone_set($wpUserTimezone);
+ CRM_Core_Config::singleton()->userSystem->setMySQLTimeZone();
+ }
return true;
}
return 'Unknown';
}
}
+
+ /**
+ * get timezone as a string
+ * @return string Timezone e.g. 'America/Los_Angeles'
+ */
+ function getTimeZoneString() {
+ return get_option('timezone_string');
+ }
}