summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-30 19:16:44 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-30 19:16:44 +0000
commit3c17d392f2a148c7fa48b3ec74db11e0630545d8 (patch)
tree2f257f8afb8e46d405a456ba1d35dd571d6205df /modules/system/system.module
parent8f9a19b340530c9a450909cffd4a580b727d16f9 (diff)
downloadbrdo-3c17d392f2a148c7fa48b3ec74db11e0630545d8.tar.gz
brdo-3c17d392f2a148c7fa48b3ec74db11e0630545d8.tar.bz2
- Added support for "special timezones". Patch by Steven/UnConeD.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index e43e2d4e9..a32c00ac3 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -88,7 +88,11 @@ function system_user($type, &$edit, $user) {
$output .= form_item(t("Theme"), "<select name=\"edit[theme]\">$options</select>", t("Selecting a different theme will change the look and feel of the site."));
}
if ($type == "edit_form") {
- for ($zone = -43200; $zone <= 46800; $zone += 3600) $zones[$zone] = date(variable_get("date_format_long", "l, F dS, Y - g:ia"), time() - date("Z") + $zone) ." (GMT ". $zone / 3600 .")";
+ $zonelist = array(-11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -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);
+ foreach ($zonelist as $offset) {
+ $zone = $offset * 3600;
+ $zones["$zone"] = date(variable_get("date_format_long", "l, F dS, Y - g:ia"), time() - date("Z") + $zone) . sprintf(" (GMT %s%02d:%02d)\n", ($offset >= 0) ? "+" : "-", floor(abs($offset)), (abs($offset) * 60) % 60);
+ }
$output .= form_select(t("Time zone"), "timezone", $edit["timezone"], $zones, t("Select what time you currently have and your time zone settings will be set appropriate."));
}