Custom post types – RSS lastBuildDate issue

This is the solution I found based off of @Rarst’s answer. Put this in the themes functions.php and it worked like a charm!

add_filter('get_lastpostmodified', 'my_lastpostmodified');
function my_lastpostmodified()
{
    global $wpdb;
    $add_seconds_server = date('Z');
    return $wpdb->get_var("SELECT  DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status="publish" ORDER  BY post_modified_gmt DESC LIMIT 1");
} 

Leave a Comment