Skip navigation
Help

drupal_get_user_timezone

7 bootstrap.inc drupal_get_user_timezone()

Return the time zone of the current user.

4 calls to drupal_get_user_timezone()

File

drupal/includes/bootstrap.inc, line 1923
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());
  }
}