minor changes
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 2 Nov 2006 18:47:09 +0000 (18:47 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 2 Nov 2006 18:47:09 +0000 (18:47 -0000)
docs/admin/config_edit.php
docs/documentation/admin/system_preferences.php
docs/include/vitals.inc.php

index 614378a..9afe268 100644 (file)
@@ -160,16 +160,10 @@ if (!isset($_POST['submit'])) {
        <div class="row">
                <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="time_zone"><?php echo _AT('time_zone'); ?></label><br />
                        <?php
-                               @putenv("TZ=UTC");
-                               $before = date('O');
-                               @putenv("TZ=US/Eastern");
-                               $after = date('O');
-                               @putenv("TZ={$_config['time_zone']}");
-
                                $sql = "SELECT Name FROM mysql.time_zone_name ORDER BY Name";
-                               $result = mysql_query($sql, $db);
+                               $result = @mysql_query($sql, $db);
                        ?>
-                       <?php if ($result && mysql_num_rows($result) && ($before != $after)): ?>
+                       <?php if ($result && mysql_num_rows($result)): ?>
                                <select name="time_zone" id="time_zone">
                                        <option value="" <?php if (!$_config['time_zone']) { echo 'selected="selected"'; } ?>><?php echo _AT('use_system_time'); ?></option>
                                        <option value=""></option>
index db0db3e..0c8e44e 100644 (file)
@@ -15,7 +15,7 @@
                        <dd>The reply address used for emails sent for instructor requests and other system emails.</dd>
 
                        <dt>Time Zone</dt>
-                       <dd>Changing ATutor's time zone to one other than that specific by the server requires MySQL 4.1.3+ and PHP's <kbd>putenv</kbd> command must be allowed. Additionally MySQL's time zone tables must be loaded; see <a href="http://dev.mysql.com/doc/refman/4.1/en/time-zone-support.html" target="_new">MySQL Server Time Zone Support</a> for additional details. This option is available in ATutor 1.5.3.3+.</dd>
+                       <dd>Changing ATutor's time zone to one other than that specific by the server requires MySQL 4.1.3+. Additionally, MySQL's time zone tables must be loaded; see <a href="http://dev.mysql.com/doc/refman/4.1/en/time-zone-support.html" target="_new">MySQL Server Time Zone Support</a> for additional details. This option is available in ATutor 1.5.3.3+.</dd>
 
                        <dt>Maximum File Size</dt>
                        <dd>Maximum allowable file size in Bytes that can be uploaded to the course's File Manager. This does not override the value set for <kbd>upload_max_filesize</kbd> in <kbd>php.ini</kbd>.</dd>
index e52fef2..9e42fd1 100644 (file)
@@ -175,7 +175,11 @@ if ($_config['time_zone']) {
        $sql = "SET time_zone='{$_config['time_zone']}'";
        mysql_query($sql, $db);
 
-       @putenv("TZ={$_config['time_zone']}");
+       if (function_exists('date_default_timezone_set')) {
+               date_default_timezone_set($_config['time_zone']);
+       } else {
+               @putenv("TZ={$_config['time_zone']}");
+       }
 }
 
 /***** 7. start language block *****/