function drupal_get_user_timezone
7.x bootstrap.inc | drupal_get_user_timezone() |
Returns the time zone of the current user.
4 calls to drupal_get_user_timezone()
- drupal_session_initialize in drupal-7.x/
includes/ session.inc - Initializes the session handler, starting a session if needed.
- drupal_session_regenerate in drupal-7.x/
includes/ session.inc - Called when an anonymous user becomes authenticated or vice-versa.
- FormatDateUnitTest::testFormatDate in drupal-7.x/
modules/ simpletest/ tests/ common.test - Tests for the format_date() function.
- _drupal_bootstrap_page_cache in drupal-7.x/
includes/ bootstrap.inc - Attempts to serve a page from the cache.
File
- drupal-7.x/
includes/ bootstrap.inc, line 2271 - Functions that need to be loaded on every Drupal request.
Code
function drupal_get_user_timezone() {
global $user;
if (variable_get('configurable_timezones', 1) && $user->uid && $user->timezone) {
return $user->timezone;
}
else {
// Ignore PHP strict notice if time zone has not yet been set in the php.ini
// configuration.
return variable_get('date_default_timezone', @date_default_timezone_get());
}
}