You are here

function _system_zonelist in Drupal 5

Same name and namespace in other branches
  1. 4 modules/system.module \_system_zonelist()
  2. 6 modules/system/system.module \_system_zonelist()
2 calls to _system_zonelist()
system_date_time_settings in modules/system/system.module
system_user in modules/system/system.module
Implementation of hook_user().

File

modules/system/system.module, line 526
Configuration system that lets administrators modify the workings of the site.

Code

function _system_zonelist() {
  $timestamp = time();
  $zonelist = array(
    -11,
    -10,
    -9.5,
    -9,
    -8,
    -7,
    -6,
    -5,
    -4.5,
    -4,
    -3.5,
    -3,
    -2.5,
    -2,
    -1,
    0,
    1,
    2,
    3,
    3.5,
    4,
    5,
    5.5,
    5.75,
    6,
    6.5,
    7,
    8,
    9,
    9.5,
    10,
    10.5,
    11,
    11.5,
    12,
    12.75,
    13,
    14,
  );
  $zones = array();
  foreach ($zonelist as $offset) {
    $zone = $offset * 3600;
    $zones[$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') . ' O', $zone);
  }
  return $zones;
}