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));
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.
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/