Exemplo n.º 1
0
function bb_datetime_format_i18n($unixtimestamp, $type = 'datetime', $formatstring = '', $gmt = true)
{
    if (empty($formatstring)) {
        $formatstring = bb_get_datetime_formatstring_i18n($type);
    }
    return bb_gmdate_i18n($formatstring, bb_offset_time($unixtimestamp), $gmt);
}
Exemplo n.º 2
0
        $timezone_object = new DateTimeZone($timezone_string);
        $found_transition = false;
        foreach (timezone_transitions_get($timezone_object) as $timezone_transition) {
            if ($timezone_transition['ts'] > time()) {
                $note = $timezone_transition['isdst'] ? __('Daylight savings time begins on <code>%s</code>') : __('Standard time begins on <code>%s</code>');
                $_time_options['timezone_string']['note'][] = sprintf($note, bb_gmdate_i18n(bb_get_datetime_formatstring_i18n(), $timezone_transition['ts'], false));
                break;
            }
        }
    }
    $time_options = array_merge($_time_options, $time_options);
} else {
    // Tidy up the old style dropdown
    $time_options['gmt_offset']['note'] = array(1 => sprintf(__('<abbr title="Coordinated Universal Time">UTC</abbr> %s is <code>%s</code>'), $time_options['gmt_offset']['options'][$gmt_offset], bb_datetime_format_i18n(bb_current_time())), 2 => __('Unfortunately, you have to manually update this for Daylight Savings Time.'));
    if ($gmt_offset) {
        $time_options['gmt_offset']['note'][0] = sprintf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), bb_gmdate_i18n(bb_get_datetime_formatstring_i18n(), bb_current_time(), true));
        ksort($time_options['gmt_offset']['note']);
    }
    foreach ($time_options['gmt_offset']['options'] as $_key => $_value) {
        $time_options['gmt_offset']['options'][$_key] = sprintf(__('UTC %s'), $_value);
    }
}
$bb_admin_body_class = ' bb-admin-settings';
bb_get_admin_header();
?>

<div class="wrap">

<h2><?php 
_e('General Settings');
?>