{"id":467,"date":"2008-06-18T16:37:50","date_gmt":"2008-06-18T20:37:50","guid":{"rendered":"http:\/\/www.opticality.com\/blog\/?p=467"},"modified":"2008-06-18T16:42:30","modified_gmt":"2008-06-18T20:42:30","slug":"wordpress-ate-my-posting-date","status":"publish","type":"post","link":"https:\/\/opticality.com\/blog\/2008\/06\/18\/wordpress-ate-my-posting-date\/","title":{"rendered":"WordPress Ate My Posting Date"},"content":{"rendered":"<p>This post is really a test, but I&#8217;ll share the full problem and solution (assuming the test works), so it might help someone else out there as well. \ud83d\ude42<\/p>\n<p>The other day, for the first time ever, I noticed that a post of mine hit my RSS reader (Thunderbird) with a date of 11\/29\/1999.\u00a0 I was busy with other things and decided to come back to it. Of course, I didn&#8217;t&#8230;<\/p>\n<p>The next time I posted, the date was correct again. I (foolishly) assumed that the problem was transient (and possibly corrected). A few more <em>good<\/em> posts, then yesterday, back-to-back bad posts. I realized exactly what was different between the <em>good<\/em> posts and the <em>bad<\/em> ones. At least procrastinating paid off this time. \ud83d\ude42<\/p>\n<p>All of my <em>good<\/em> posts were made with Windows Live Writer locally on my laptop and then saved to the server as a draft for continued editing. All of my <em>bad<\/em> posts were started and finished directly in the web interface of WordPress 2.5.1.<\/p>\n<p>This certainly wasn&#8217;t a native 2.5.1 problem, because I&#8217;ve been running 2.5.1 a lot longer than my first bad RSS pull and until reasonably recently, I posted 100% of the time through the web interface. I selected the last few rows from the <em>wp_posts<\/em> table and spotted the problem instantly.<\/p>\n<p>The <strong>post_date_gmt<\/strong> had the following value in my three <em>bad<\/em> posts: <strong>0000-00-00<\/strong>. A Google search revealed this <a title=\"WordPress.org Forum on post_date_gmt problem\" href=\"http:\/\/wordpress.org\/support\/topic\/171725\" target=\"_blank\">forum thread<\/a> discussing the problem. Some people seemed to think it was related to the installation of <a title=\"XCache\" href=\"http:\/\/xcache.lighttpd.net\/\" target=\"_blank\">XCache<\/a> (others thought that you also needed a separate plugin installed to provoke the problem). Since I recently installed XCache (as reported in my <a title=\"NginX Reporting for Duty\" href=\"https:\/\/www.opticality.com\/blog\/2008\/06\/09\/nginx-reporting-for-duty\/\" target=\"_self\">NginX post<\/a>), I was more than willing to believe that this was my problem. Of course, I didn&#8217;t see how it worked when Windows Live Writer was posting, but it was certainly possible that it took a different code path&#8230;<\/p>\n<p>There was a <a title=\"WordPress Patch post_date_gmt problem\" href=\"http:\/\/trac.wordpress.org\/ticket\/6527\" target=\"_blank\">pointer to a patch<\/a> in that thread. The person who posted the link also commented that he thought this was not the &#8220;right&#8221; fix, though he said it worked. I&#8217;m not sure why he felt that way. Aside from being innocuous (meaning, there was no way that this could hurt anything), it seemed like a reasonable fix and was already in the trunk for WordPress 2.5.2, so it also seemed safe to apply, given that it would soon be production WordPress anyway.<\/p>\n<p>So, I downloaded and applied the patch. I won&#8217;t know until I click on <strong>Publish<\/strong> whether it will work, as the post_date_gmt column correctly remains at 0000-00-00 while I&#8217;m in <strong>Draft<\/strong> mode. If it works, I won&#8217;t update this post. If it fails, I&#8217;ll come back and add another paragraph to let you know it didn&#8217;t work&#8230;<\/p>\n<p><strong>Update<\/strong>: I decided to add this bit quickly. It <strong>worked<\/strong> (so that&#8217;s not why I&#8217;m back here). I thought of one more possibility for the cause, which has nothing to do with XCache. Recently, I noticed that my posting times were in EST, not EDT (meaning, the one hour time-zone change didn&#8217;t happen automatically). I went into the WP Admin interface and adjusted the setting to be GMT-4 instead of GMT-5. It&#8217;s possible that this change caused the problem as well, but I really have no idea&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is really a test, but I&#8217;ll share the full problem and solution (assuming the test works), so it might help someone else out there as well. \ud83d\ude42 The other day, for the first time ever, I noticed that a post of mine hit my RSS reader (Thunderbird) with a date of 11\/29\/1999.\u00a0 I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[4,3,2],"tags":[23,235,21,303],"class_list":["post-467","post","type-post","status-publish","format-standard","hentry","category-4","category-3","category-2","tag-blog-software","tag-computers","tag-wordpress","tag-xcache"],"_links":{"self":[{"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/posts\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":0,"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/posts\/467\/revisions"}],"wp:attachment":[{"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/categories?post=467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opticality.com\/blog\/wp-json\/wp\/v2\/tags?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}