You are here

function tzfield_timezones in Time Zone Field 6

Fetch an array of all candidate timezones, for use in presenting the selection form to the user.

3 calls to tzfield_timezones()
tzfield_allowed_values in ./tzfield.module
Implementation of hook_allowed_values().
tzfield_autocomplete in ./tzfield.module
Menu callback; Retrieve a pipe delimited string of autocomplete suggestions for timezones
tzfield_field in ./tzfield.module
Implementation of hook_field().

File

./tzfield.module, line 356
Defines a field type for storing timezones.

Code

function tzfield_timezones($field) {
  $timezones = tzfield_identifiers_list();
  if (isset($field['exclude']) && is_array($field['exclude'])) {
    return array_diff($timezones, $field['exclude']);
  }
  else {
    return $timezones;
  }
}