Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter Fotis Kokkoras

    (@kokkorascsdauthgr)

    More details….

    The plug in works ok with WP 2.9.1 There is only one issue:

    Say that I am setting a post to expire at 17, using the Expirator panel in the Edit Post page. Then I go to the Posts page where it says that the post expires at 15. The same (15) is displayed in all over the WP. Only the Expirator Panel in the Edit Post page dispays the time set.

    The good thing is that the plug-in do works. The post expires at 17, not 15.

    It looks like WP do not dispay the expiration time properly but I am not sure if this is a WP issue. I still believe that it is related to the daylight saving time – that’s why the 2 hour difference.

    I am running 2.9.2. Expirator appears to work, but I’m going to do some more testing to be positive.

    However, I noted a similar problem with the post expiration hour. It appears to follow UTC time, regardless of the WP setting for UTC (I am UTC-5). If Greece is UTC+2, that would explain your issue as well.

    Until there is a fix (was this always a problem, or just with recent WP versions?), I think our solution is to base our desired expiration on UTC time, e.g. if I want 18 Eastern US, I have to set it as 23. For 18 in Greece, it would be 16.

    I just released a new version that uses the same timezone as configured in the blog. It also fixes a few other compatibility issues.

    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.

    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.

    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.

    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. ??

    Ok…I tried both suggestions and neither of them worked, do you have any other ideas?

    It would be great to hear from the developer as well on this topic.

    Thanks

    Can anyone help on this…?

    Still looking for a fix that I can get to work…anyone?

    I’m out 5 hours no matter what I do.

    physalis

    (@physalis)

    Same here. The config page still shows the wrong date.
    Is the plugin actually working, since it seemed to have no effect. May have been a conflict with the time zone stuff…

    semrocc

    (@semrocc)

    The plugin still works for me, though it does delete it 5 hours earlier than its supposed to, the exact time that it shows on the plugin config page.

    physalis

    (@physalis)

    Anyone tried the change-to-draft function, does that work? In my case it doesn’t seem to… though this is what I really need^^.

    *Cough* Anyone? Do you all use the delete function and it works as expected?

    I use the draft function and works as expected…though 5 hours earlier than it should.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Plugin: Post Expirator] Daylight Saving Time problem (?)’ is closed to new replies.