diff --git a/admin/config.html b/admin/config.html index 3f4a7f8e31ad5..5d93556dc83b4 100644 --- a/admin/config.html +++ b/admin/config.html @@ -43,6 +43,33 @@ + +

timezone: + timezone) > 13) { + $config->timezone = 99; + } + $timenow = time(); + + for ($tz = -26; $tz <= 26; $tz++) { + $zone = (float)$tz/2.0; + $usertime = $timenow + ($tz * 1800); + if ($tz == 0) { + $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT)"; + } else if ($tz < 0) { + $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT$zone)"; + } else { + $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT+$zone)"; + } + } + + choose_from_menu ($timezones, "timezone", $config->timezone, get_string("serverlocaltime"), "", "99"); + ?> + + + + +

country: country, get_string("selectacountry"), "") ?> diff --git a/lang/en/moodle.php b/lang/en/moodle.php index a01fd88062340..67fc8967ce962 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -153,6 +153,7 @@ $string['configsmtpuser'] = 'If you have specified an SMTP server above, and the server requires authentication, then enter the username and password here.'; $string['configteacherassignteachers'] = 'Should ordinary teachers be allowed to assign other teachers within courses they teach? If \'No\', then only course creators and admins can assign teachers.'; $string['configtextfilters'] = 'Text filters process text in various ways. Specify the relative paths to text filters you want to use in the order they should be applied to texts, separated by commas. (For example, mod/glossary/dynalink.php, filter/censor/censor.php)'; +$string['configtimezone'] = 'You can set the default timezone here. This is the only the DEFAULT timezone for displaying dates - each user can override this by setting their own in their profile. \"Server time\" will make Moodle default to the server\'s operating system setting.'; $string['configunzip'] = 'Indicate the location of your unzip program (Unix only, optional). If specified, this will be used to unpack zip archives on the server. If you leave this blank, then Moodle will use internal routines.'; $string['configuration'] = 'Configuration'; $string['configvariables'] = 'Variables'; diff --git a/lib/defaults.php b/lib/defaults.php index 2cc140bd17df6..c6a579cd89947 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -38,6 +38,7 @@ "smtpuser" => "", "teacherassignteachers" => true, "textfilters" => "mod/glossary/dynalink.php", + "timezone" => 99, "theme" => "standard", "unzip" => "", "zip" => ""