// Work out the best timezone to use, in order of precedence
$timezones = array(
- 99, // this is a placeholder that gets skipped in the first next() call
isset($USER->timezone) ? $USER->timezone : 99,
isset($CFG->timezone) ? $CFG->timezone : 99,
);
- while($timezone == 99 && $next = next($timezones)) {
- $timezone = (float)$next;
+ while($timezone == 99 && $next = each($timezones)) {
+ $timezone = (float)$next['value'];
}
/*
// Work out the best timezone to use, in order of precedence
$timezones = array(
- 99, // this is a placeholder that gets skipped in the first next() call
isset($USER->timezone) ? $USER->timezone : 99,
isset($CFG->timezone) ? $CFG->timezone : 99,
);
- while($timezone == 99 && $next = next($timezones)) {
- $timezone = (float)$next;
+ while($timezone == 99 && $next = each($timezones)) {
+ $timezone = (float)$next['value'];
}
/*
// Work out the best timezone to use, in order of precedence
$timezones = array(
- 99, // this is a placeholder that gets skipped in the first next() call
isset($USER->timezone) ? $USER->timezone : 99,
isset($CFG->timezone) ? $CFG->timezone : 99,
);
- while($timezone == 99 && $next = next($timezones)) {
- $timezone = (float)$next;
+ while($timezone == 99 && $next = each($timezones)) {
+ $timezone = (float)$next['value'];
}
/*
// Work out the best timezone to use, in order of precedence
$timezones = array(
- 99, // this is a placeholder that gets skipped in the first next() call
isset($USER->timezone) ? $USER->timezone : 99,
isset($CFG->timezone) ? $CFG->timezone : 99,
);
- while($timezone == 99 && $next = next($timezones)) {
- $timezone = (float)$next;
+ while($timezone == 99 && $next = each($timezones)) {
+ $timezone = (float)$next['value'];
}
/*
if ($timezone == 99) { // Work out the best timezone to use
// Work out the best timezone to use, in order of precedence
$timezones = array(
- 99, // this is a placeholder that gets skipped in the first next() call
isset($USER->timezone) ? $USER->timezone : 99,
isset($CFG->timezone) ? $CFG->timezone : 99,
);
- while($timezone == 99 && $next = next($timezones)) {
- $timezone = (float)$next;
+ while($timezone == 99 && $next = each($timezones)) {
+ $timezone = (float)$next['value'];
}
/*
if ($timezone == 99) { // Work out the best timezone to use