{"id":18342,"date":"2010-08-31T07:03:28","date_gmt":"2010-08-31T13:03:28","guid":{"rendered":"http:\/\/hill-kleerup.org\/blog\/?p=18342"},"modified":"2010-08-31T10:45:27","modified_gmt":"2010-08-31T16:45:27","slug":"time-stamped-the-sequel","status":"publish","type":"post","link":"https:\/\/hill-kleerup.org\/blog\/2010\/08\/31\/time-stamped-the-sequel.html","title":{"rendered":"Time Stamped (the Sequel)"},"content":{"rendered":"<p>We have a fix, apparently, for the Twitter Tools datestamp \/ timestamp \/ timezone issue I reported <a href=\"https:\/\/hill-kleerup.org\/blog\/2010\/08\/18\/time-stamped.html\">here<\/a>.\u00a0 <a href=\"http:\/\/crowdfavorite.com\/forums\/topic\/daily-digest-wrong-time\">Rich Weingartner on the Crowd Favorite forum<\/a>:<\/p>\n<blockquote><p>I seem to have found the fix for this, and another tweak I make to  Twitter Tools to use it, since sometimes my digest would post at the  correct time but get the wrong date in the title of the post.  Here are  the two tweaks I make.<\/p>\n<p>These are both in twitter-tools.php in the function do_digest_post.<\/p>\n<p>1)  after the &#8220;if (!$start || !$end) return false;&#8221; line I added:<\/p>\n<p>\/\/RDW Set default timezone to see if it posts correctly<br \/>\ndate_default_timezone_set(&#8216;America\/Detroit&#8217;);<\/p>\n<p>Now I hardcoded my timezone I am using, so you&#8217;ll have to change it  to your timezone PHP string.  Ideally this would pick up the timezone  set for WordPress, but I didn&#8217;t take time to figure out how to do that.   What happens is that when the date function is used, if it can&#8217;t find a  timezone setting to convert the date\/time to a local time, it uses GMT.<\/p>\n<p>2)  This fix is for when the date in the digest post title would be a  day off as well.  Which would happen when the post would get added to  the system the day after, even though the post time and correct tweets  would be in the post.<\/p>\n<p>A little farther down in the function, there is a line that says:<br \/>\n&#8216;post_title&#8217; =&gt; $wpdb-&gt;escape(sprintf($title, date(&#8216;Y-m-d&#8217;))),<br \/>\nI changed this to:<br \/>\n&#8216;post_title&#8217; =&gt; $wpdb-&gt;escape(sprintf($title, date(&#8216;Y-m-d&#8217;, $end))),<\/p>\n<p>basically adding the $end to the date function, so that it uses the  end date of the digest time frame instead of the current date.<\/p><\/blockquote>\n<p>I incorporated this change into my twitter-tools.php (changing the time zone to &#8220;America\/Denver&#8221;), and my Twitter digest last night worked <em>perfectly<\/em>.\u00a0 Thanks, Rich.<\/p>\n<p>(I copied the whole of the above in here in case the forum post goes away.)<\/p>\n<p>Now let&#8217;s hope the fix gets incorporated into future versions of Twitter Tools, so I don&#8217;t have to recreate it each time there&#8217;s an update.<\/p>\n<p>Now, will this also apply to the similar problem I&#8217;ve been having with Digest Post for Google Reader?\u00a0 When I get a chance, I&#8217;ll see.<\/p>\n<p><strong>UPDATE<\/strong>: \u00a0I added in the <em>date_default_timezone_set<\/em> line in the digest-post.php, at the top of the post_digest function. \u00a0That seems to have worked!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have a fix, apparently, for the Twitter Tools datestamp \/ timestamp \/ timezone issue I reported here.\u00a0 Rich Weingartner on the Crowd Favorite forum: I seem to have found the fix for this, and another tweak I make to Twitter Tools to use it, since sometimes my digest would post at the correct time &hellip; <a href=\"https:\/\/hill-kleerup.org\/blog\/2010\/08\/31\/time-stamped-the-sequel.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Time Stamped (the Sequel)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_analysis_target_kw":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[55],"tags":[],"class_list":["post-18342","post","type-post","status-publish","format-standard","hentry","category-blogging-technical"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":18174,"url":"https:\/\/hill-kleerup.org\/blog\/2010\/08\/18\/time-stamped.html","url_meta":{"origin":18342,"position":0},"title":"Time Stamped","author":"***Dave","date":"Wed 18-Aug-10 7:57pm","format":false,"excerpt":"So I'm having a couple of odd problems here at the blog ... I have two different widgets that post content here from elsewhere.\u00a0 One is the Wordpress \"Twitter Tools\" plugin, which will post a daily digest of my various Tweets.\u00a0 The other is Digest Post for Google Reader, which\u2026","rel":"","context":"In &quot;Blogging - Technical&quot;","block_context":{"text":"Blogging - Technical","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/blogging-technical"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hill-kleerup.org\/blog\/wp\/wp-content\/uploads\/2010\/08\/time-tunnel.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":32746,"url":"https:\/\/hill-kleerup.org\/blog\/2013\/03\/18\/i-have-no-blog-feed-and-i-must-scream.html","url_meta":{"origin":18342,"position":1},"title":"I have no blog feed and I must scream","author":"***Dave","date":"Mon 18-Mar-13 10:15pm","format":false,"excerpt":"Okay, looking for any Wordpress-savvy experience out there. \u00a0I have two plug-ins -- Twitter Tools and Google+Blog -- that periodically write stuff to my blog from the respective social systems involved (Twitter Tools makes a very nice, neat daily digest; Google+Blog mirrors my posts here to my blog).Both stopped working\u2026","rel":"","context":"In &quot;~PlusPosts&quot;","block_context":{"text":"~PlusPosts","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/plusposts"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":32884,"url":"https:\/\/hill-kleerup.org\/blog\/2013\/03\/24\/twitter-tools-and-archives.html","url_meta":{"origin":18342,"position":2},"title":"Twitter, Tools, and Archives","author":"***Dave","date":"Sun 24-Mar-13 12:08am","format":false,"excerpt":"My Twitter Tools daily archives on this page have been broken since early February, and I'm unable to get them working again at this point. Twitter Tools -- the Twitter\/WP plug-in I use -- for some reason isn't generating the daily (or weekly) digests it is supposed to. It will\u2026","rel":"","context":"In &quot;Blogging - Technical&quot;","block_context":{"text":"Blogging - Technical","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/blogging-technical"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hill-kleerup.org\/blog\/wp\/wp-content\/uploads\/2013\/03\/Technical-difficulties.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":14827,"url":"https:\/\/hill-kleerup.org\/blog\/2009\/05\/19\/tweets-from-three_star_dave-on-2009-05-19.html","url_meta":{"origin":18342,"position":3},"title":"Tweets from @Three_Star_Dave on 2009-05-19","author":"***Dave","date":"Tue 19-May-09 11:30pm","format":false,"excerpt":"Sprinklers now on 3-day cycle. Sprinkler repairman coming today to fix one underperforming zone. Yard will, with luck, survive vacation. # Silly me. When sprinkler people said they'd be here between 10 and Noon, I figured they were referring to this time zone. # Apparently the sprinkler people work on\u2026","rel":"","context":"In &quot;~Tweets&quot;","block_context":{"text":"~Tweets","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/tweets"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14813,"url":"https:\/\/hill-kleerup.org\/blog\/2009\/05\/17\/tweets-from-three_star_dave-on-2009-05-17.html","url_meta":{"origin":18342,"position":4},"title":"Tweets from @Three_Star_Dave on 2009-05-17","author":"***Dave","date":"Sun 17-May-09 11:30pm","format":false,"excerpt":"Terminator 2: Holds up remarkably well for being as \"old\" a film as it is. Of course, fully invalidated, story-wise, by series & sequel. # Kitten's birthday impends - occurs to me I need to help her update her Amazon wish list. # Four more sprinkler heads replaced or realigned.\u2026","rel":"","context":"In &quot;~Tweets&quot;","block_context":{"text":"~Tweets","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/tweets"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":30582,"url":"https:\/\/hill-kleerup.org\/blog\/2012\/10\/15\/tweets-from-2012-10-15.html","url_meta":{"origin":18342,"position":5},"title":"Tweets from 2012-10-15","author":"***Dave","date":"Mon 15-Oct-12 10:45pm","format":false,"excerpt":"3 of 5 stars to Revenge of the Damned by Allan Cole Link # Saturday was pretty much non-stop relaxing entertainment for me. Nummy #GABF brunch at Fogo, then Margie and I playing #WoW most of the day. # Sunday was instad a series of low-grade frustrations which certainly could\u2026","rel":"","context":"In &quot;~Tweets&quot;","block_context":{"text":"~Tweets","link":"https:\/\/hill-kleerup.org\/blog\/category\/blogging\/tweets"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/18342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/comments?post=18342"}],"version-history":[{"count":0,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/posts\/18342\/revisions"}],"wp:attachment":[{"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/media?parent=18342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/categories?post=18342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hill-kleerup.org\/blog\/wp-json\/wp\/v2\/tags?post=18342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}