function _system_zonelist in Drupal 6
Same name and namespace in other branches
- 4 modules/system.module \_system_zonelist()
- 5 modules/system/system.module \_system_zonelist()
Generate an array of time zones and their local time&date.
3 calls to _system_zonelist()
- install_configure_form in ./
install.php - Form API array definition for site configuration.
- system_date_time_settings in modules/
system/ system.admin.inc - Form builder; Configure the site date and time settings.
- system_user in modules/
system/ system.module - Implementation of hook_user().
File
- modules/
system/ system.module, line 1936 - 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;
}