WordPress 3.4.1 Showing February as March (1 post)

  1. youngonline
    Posted 4 years ago #

    So today i wrote the good ol' mod to display my post archive by year, by month and then by post with jquery show/hide functionality and I noticed something rather frustrating.

    I'm using the standard code anyone uses for this:

    <? $months = $wpdb->get_col("SELECT DISTINCT MONTH(post_date)
    FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post'
    AND YEAR(post_date) = '".$year."' ORDER BY post_date DESC");
    foreach($months as $month) :

    Now the annoying part... When displaying the months, february appears as march! So the months go January, March, March, April...

    I grepped the wordpress files to see if March appeared anywhere where it should say February, but everything was fine. When displaying dates in the post list generated by wp_query, the post list says february as it should, where it should. It's only when using the code above that february displays as march, but shows the february posts, and the second instance of march shows the march posts as it should.

    Any know what the heck is goin' on here, and even better, how to fix it???

Topic Closed

This topic has been closed to new replies.

About this Topic