https://buy-zithromax.online buy kamagra usa https://antibiotics.top buy stromectol online https://deutschland-doxycycline.com https://ivermectin-apotheke.com kaufen cialis https://2-pharmaceuticals.com buy antibiotics online Online Pharmacy vermectin apotheke buy stromectol europe buy zithromax online https://kaufen-cialis.com levitra usa https://stromectol-apotheke.com buy doxycycline online https://buy-ivermectin.online https://stromectol-europe.com stromectol apotheke https://buyamoxil24x7.online deutschland doxycycline https://buy-stromectol.online https://doxycycline365.online https://levitra-usa.com buy ivermectin online buy amoxil online https://buykamagrausa.net

Time Stamped (the Sequel)

We have a fix, apparently, for the Twitter Tools datestamp / timestamp / timezone issue I reported hereRich 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 but get the wrong date in the title of the post. Here are the two tweaks I make.

These are both in twitter-tools.php in the function do_digest_post.

1) after the “if (!$start || !$end) return false;” line I added:

//RDW Set default timezone to see if it posts correctly
date_default_timezone_set(‘America/Detroit’);

Now I hardcoded my timezone I am using, so you’ll have to change it to your timezone PHP string. Ideally this would pick up the timezone set for WordPress, but I didn’t take time to figure out how to do that. What happens is that when the date function is used, if it can’t find a timezone setting to convert the date/time to a local time, it uses GMT.

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.

A little farther down in the function, there is a line that says:
‘post_title’ => $wpdb->escape(sprintf($title, date(‘Y-m-d’))),
I changed this to:
‘post_title’ => $wpdb->escape(sprintf($title, date(‘Y-m-d’, $end))),

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.

I incorporated this change into my twitter-tools.php (changing the time zone to “America/Denver”), and my Twitter digest last night worked perfectly.  Thanks, Rich.

(I copied the whole of the above in here in case the forum post goes away.)

Now let’s hope the fix gets incorporated into future versions of Twitter Tools, so I don’t have to recreate it each time there’s an update.

Now, will this also apply to the similar problem I’ve been having with Digest Post for Google Reader?  When I get a chance, I’ll see.

UPDATE:  I added in the date_default_timezone_set line in the digest-post.php, at the top of the post_digest function.  That seems to have worked!

48 view(s)  

One thought on “Time Stamped (the Sequel)”

Leave a Reply

Your email address will not be published. Required fields are marked *