get_results("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970");
if ($post_datetimes) {
$firstpost_year = $post_datetimes[0]->firstyear;
$lastpost_year = $post_datetimes[0]->lastyear;
$copyright = __('Copyright © ', 'blocks2') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
bloginfo('name');
}
?>