You are here

function visitors_get_timezone in Visitors 7.2

Same name and namespace in other branches
  1. 8 visitors.module \visitors_get_timezone()
  2. 7 visitors.module \visitors_get_timezone()
  3. 7.0 visitors.module \visitors_get_timezone()

Get user timezone.

Return value

string timezone

5 calls to visitors_get_timezone()
visitors_city_hits in reports/city_hits.inc
Display city hits report.
visitors_hit_details in reports/hit_details.inc
Menu callback; Displays recent page accesses.
visitors_host_hits in reports/hosts.inc
Menu callback; presents the "hits from" page.
visitors_recent_hits in reports/recent_hits.inc
Display recent hits report.
visitors_timezone_diff in ./visitors.module
Get difference in seconds user timezone and GMT.

File

./visitors.module, line 262

Code

function visitors_get_timezone() {
  $timezone = variable_get('date_default_timezone', 0);
  if (variable_get('configurable_timezones', 0) == '1') {
    global $user;
    if ($user->timezone !== NULL) {
      $timezone = $user->timezone;
    }
  }
  return $timezone;
}