function fp_get_user_timezone

6.x db.inc fp_get_user_timezone($account = NULL)

Returns back the timezone for this user, if selected. If not, we return back the system timezone.

12 calls to fp_get_user_timezone()
calendar_appointment_content_form_validate in modules/calendar/calendar.module
Custom validate handler for when we save an appointment form. We want to confirm the student is valid, and also store ONLY the cwid.
calendar_confirm_cancel_appointment_form_submit in modules/calendar/calendar.module
calendar_display_schedule_appointment_page in modules/calendar/calendar.module
This is the page which lets students schedule an appointment with the faculty member supplied in the user_id.
calendar_display_upcoming_appointments in modules/calendar/calendar.module
calendar_find_and_remind_notify_upcoming_appointments in modules/calendar/calendar.module
This function will find appointments approaching within X number of minutes, and send out notifications to all involved.

... See full list

File

includes/db.inc, line 486
This file contains mostly db shortcuts.

Code

function fp_get_user_timezone($account = NULL) {
  global $user;

  if (is_numeric($account)) {
    $account = fp_load_user($account);
  }

  if ($account == NULL) {
    $account = $user;
  }



  $utz = trim(@$account->settings ['timezone']);
  if ($utz) {
    return $utz;
  }

  // Else...

  $system_timezone = variable_get('system_timezone', 'America/Chicago');
  return $system_timezone;


}