Forum Replies Created

Viewing 6 replies - 76 through 81 (of 81 total)
  • You can add:

    $expirationdatets += get_option( 'gmt_offset' ) * 3600;

    in postexpirator_add_footer(). Just after:

    $expirationdatets = get_post_meta($post->ID,'expiration-date',true);
    if (!is_numeric($expirationdatets))
    	return $text;

    Seams to be a good fix… ??

    You could also check the config page, where you can enter date and time format. Thise code:

    (<?php echo date("$expirationdateDefaultDateFormat") ?>)

    Could instead be this:

    (<?php echo date("$expirationdateDefaultDateFormat", current_time('timestamp')) ?>)

    (If you use “c” as a date format it will output +00:00 as a timezone. But thats more of a WP thing than the plugin.)

    Ok. Thats all from me. ??

    The post expired. So its only the output time that is wrong for me now. After I have changed my timezone to a city based timezone. ?? I guess that when you choose UTC+1 WP just adds 1 hour. But when you choose Stockholm it also corrects for DST.

    So the only patch this plugin currently needs is output correction. ?? It seams.

    More info:

    I had UTC+1 as my timezone on my blog (Im In sweden). But that doesnt take DST into account.

    So with UTC+1 I got:
    UTC time is 2010-07-07 12:50:42
    Local time is 2010-07-07 13:50:42
    (one hour wrong)

    But I changed and choosed Stockholm as my timezone instead. (Not sure when this feature was introduced in WP, dont think I have seen it before. Maybe its a WP3 thing?)

    So with Stockholm timezone I got:
    TC time is 2010-07-07 12:52:49
    Local time is 2010-07-07 14:52:49
    (correct!)

    So when I created a post, or edited an old post, the default time for Post Expirator was correct. But if I enable the post footer i still get the wrong timezone time.

    So I choose 14:50 today as expire date, but I get:
    “Post expires at 12:50pm on Wednesday July 7th, 2010”

    Gonna test and see if the actual time where it expires still is wrong.

    I have 1.4 (with WP3) and it had Post expires at 8:00am on Wednesday July 7th, 2010 but expired at 10:00am. So the timezone/dst thingy seams to be there still.

    For people like me who Googled their way here but then had to find the solution by them self… ??

    I used SimplePie in my theme. I used the following line:
    require_once(WP_CONTENT_DIR.'/themes/feedmeastraycat2/libs/simplepie.inc');

    Which I changed to:
    require_once(ABSPATH.'/wp-includes/class-simplepie.php');

    Tadaaaa.

    So this is really really late. But I had the same problem. Ive created a plugin that imports a swedish microblog (www.bloggy.se, like twitter) into your blog. It checks an rss channel and imports all posts into a specific wordpress category. I wanted to ignore the ping (from “Update service”) with these posts. But only these posts.

    I looked like a maniac. I havent even been able to find WHERE in the WordPress codes these are sent. Haha.

    Anyway. With some luck I find what I think is a solution. By ignoring all the posts from the specific category in the feed. They are not sent by the “Update Service”. I guess the Update Service uses the xml feed when pinging.

    To skip the posts I added this (sort of, a bit edited) into my plugin:

    function myPlugin_pre_get_posts($wp_query) {
    	if ($wp_query->is_feed) {
    		$wp_query->query_vars['category__not_in'][] = $category_id_to_skip_in_feed;
    	}
    }
    add_action('pre_get_posts', 'myPlugin_pre_get_posts');
Viewing 6 replies - 76 through 81 (of 81 total)