Make WordPress Core


Ignore:
Timestamp:
04/24/2004 09:52:24 PM (20 years ago)
Author:
saxmatt
Message:

Timezone fixes, I hope.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-general.php

    r1142 r1150  
    220220
    221221function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
    222     global $tableposts, $time_difference;
     222    global $tableposts;
    223223    global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb;
    224224
     
    255255    }
    256256
    257     $add_hours = intval($time_difference);
    258     $add_minutes = intval(60 * ($time_difference - $add_hours));
     257    $add_hours = intval(get_settings('gmt_offset'));
     258    $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
    259259    $wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)";
    260260
     
    337337        $w = ''.intval($_GET['w']);
    338338    }
    339     $time_difference = get_settings('time_difference');
    340     $add_hours = intval($time_difference);
    341     $add_minutes = intval(60 * ($time_difference - $add_hours));
     339
     340    $add_hours = intval(get_settings('gmt_offset'));
     341    $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
    342342    $wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)";
    343343
     
    360360        }
    361361    } else {
    362         $thisyear = gmdate('Y', current_time('timestamp') + $time_difference * 3600);
    363         $thismonth = gmdate('m', current_time('timestamp') + $time_difference * 3600);
     362        $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
     363        $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);
    364364    }
    365365
     
    477477        $newrow = false;
    478478
    479         if ($day == date('j', (time() + ($time_difference * 3600))) && $thismonth == date('m', time()+($time_difference * 3600)))
     479        if ($day == date('j', (time() + (get_settings('gmt_offset') * 3600))) && $thismonth == date('m', time()+(get_settings('gmt_offset') * 3600)))
    480480            echo '<td id="today">';
    481481        else
Note: See TracChangeset for help on using the changeset viewer.