<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>
<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>
$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 *****/