From: moodler Date: Thu, 12 Feb 2004 06:08:06 +0000 (+0000) Subject: A new configuration setting so that the admin can define the site's default X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d6582c7cac6c502574b7364c4c81e72b4697bacb;p=moodle.git A new configuration setting so that the admin can define the site's default timezone. --- diff --git a/admin/config.html b/admin/config.html index 3f4a7f8e31..5d93556dc8 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 a01fd88062..67fc8967ce 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -153,6 +153,7 @@ $string['configsmtphosts'] = 'Give the full name of one or more local SMTP serve $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 2cc140bd17..c6a579cd89 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" => ""