You are here

function date_event_zonelist_by_name in Date 6.2

Same name and namespace in other branches
  1. 5.2 date_timezone/date_timezone.module \date_event_zonelist_by_name()

Helper function to update Event module timezone information.

2 calls to date_event_zonelist_by_name()
date_timezone_update_site in date_timezone/date_timezone.module
Callback from site timezone settings form to update site timezone info. When the timezone name is updated, update the offset as well.
date_timezone_update_user in date_timezone/date_timezone.module
Callback from user timezone settings form to update user timezone info. When the timezone name is updated, update the offset as well.

File

date_timezone/date_timezone.module, line 277
This module will make the alter the user and site timezone forms to select a timezone name instead of a timezone offset.

Code

function date_event_zonelist_by_name($name) {
  if (!module_exists('event') || !db_table_exists('event_timezones')) {
    return array();
  }
  static $zone_names = array();
  if (!isset($zone_names[$name])) {
    $zone = db_fetch_array(db_query("SELECT * FROM {event_timezones} WHERE name = '%s'", $name));
    $zone_names[$name] = $zone;
  }
  return $zone_names[$name];
}