• Resolved kto

    (@karento)


    Hello!
    I think Postie’s time calculation is incorrect. Here’s what I see when I click debug:
    Clock

    This shows what time it would be if you posted right now

    Wordpress timezone: America/Denver (-6)
    Current time: 2017-03-23 11:45:23
    Current time (gmt): 2017-03-23 17:45:23
    Postie time correction:
    Post time: 2017-03-23 11:45:23

    However, posts are being created at gmt. I’d prefer not to use “Postie time correction” because then I’ll need to manually update it whenever daylight savings time starts and ends. Am I misunderstanding how this should work?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    Postie time corrections are undergoing some changes as the original reason for them is no longer necessary. For the time being you need to set it to the WordPress timezone offset, (-6 in your case).

    Thread Starter kto

    (@karento)

    OK. Thanks, Wayne, for the quick response.

    Hello Wayne,
    I struggled a bit with this issue tonight.

    For time awareness, let’s set ourselves at Tue, 11 Apr 2017 20:07:00 +0000.
    I run with Postie v1.8.38 under WordPress 4.7.3.

    The email I receive is in GMT timezone set at Tue, 11 Apr 2017 18:46:35 +0000

    My blog is set to timezone: Europe/Paris so +0002

    If I use Postie offset at 0, the post is published immediately with time in the post edition page at 18:46.
    I I use Postie offset at 2, the post is set at correct time 20:46 in the post edition page but postponed.
    debug output shows:
    [post_date] => 2017-04-11T20:46:35+00:00
    [post_date_gmt] => 2017-04-11 20:46:35

    I tested this and it will effectively be published at that time, but technically that’s in the future in reference to original email date/time.
    I think that debug should be:
    [post_date] => 2017-04-11T20:46:35+20:00
    [post_date_gmt] => 2017-04-11 18:46:35

    Therefore, I deactivated the Postie time correction option and added the following line at the end of tag_Delay function in postie-functions.php and it does work.
    $corrected_date->setTimezone(new DateTimeZone($tzs));

    Plugin Author Wayne Allen

    (@wayneallen-1)

    I’d have to see some debug output to really know what is going on.

    You can try setting “Ignore Email Date” to “yes” and the emails will have a publish datetime of the moment they were processed by Postie and you don’t have to worry about time zones at all.

    The thing is that I actually need the email date and time as we are updating the blog with a satellite connection and potentially buffering quite some messages before sending.
    As it’s a sailing trip, I need the date and time from email to use and display the position.

    I’ve read on 1.8.36 release notes that “You can now ignore the Postie offset with the “Use Postie Time Correction” setting. With this setting set to “No” the timezone set in your Settings::General menu will be respected.”
    In what function is the timezone set supposed to happen?
    I can mail you the debug output if you want.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    WordPress sets the timezone based on what you set up in Settings/General.

    Do please sent me the debug output at [email protected].

    Even better would be to install the Support addon so I can see the original email structure as well. http://postieplugin.com/downloads/support-addon/

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Postie publish date/time incorrect’ is closed to new replies.