graulund / tweetnest

NO LONGER MAINTAINED. MESSAGE ME IF YOU WANT TO MAINTAIN THIS. :) A browsable, searchable and easily customizable archive and backup for your tweets
MIT License
492 stars 93 forks source link

Month/days not loading #81

Open ykyu opened 8 years ago

ykyu commented 8 years ago

The month list on the side stopped loading for me about two months ago: http://kiriska.com/tweety/ I was on the last release of TweetNest, beta 1.1, I guess? loadtweets.php had also stopped working.

I just download the master copy from here and reinstalled/reauth'd everything. I was able to use loadtweets.php and loaduser.php fine now, but the months still don't display. Navigating to month/day pages also doesn't work: http://kiriska.com/tweety/2015/11 All the tweets are still safe in the database, so I'm not sure what the issue is.

ykyu commented 8 years ago

Ended up it was a weird timezone offset issue. SQL's "SELECT TIMESTAMPDIFF(SECOND, UTC_TIMESTAMP(), NOW())" and PHP's date('Z') were returning different values, which was causing problems. To be honest, I'm not sure what the issue was exactly, but manually setting DB_OFFSET to "+0" fixed the problem without appearing to create any additional problems, so...

ykyu commented 8 years ago

Update: figured it out. the 'time' column of the 'prefix_tweets' table needs to be unsigned to allow for negative offset math in the case the mysql timezone and php timezone differ.

geekafy commented 7 years ago

I seem to have the same problem, how do you modify the DB_OFFSET to +0 exactly?

Time table is already unsigned.

ykyu commented 7 years ago

I no longer needed the +0 fix after setting the prefix_tweets table as unsigned, so it's strange you're still experiencing the same issue.

My prior fix was in inc/preheader.php, after: $dbOffset = $dbOffset >= 0 ? '+' . $dbOffset : $dbOffset; I inserted: $dbOffset = "+0"; Which is honestly a really bad fix.

I'd suggest making sure that your problem was the same as mine (date offset) by printing out the php date and database date and going from there. There might be another problem that causes the same issue?

geekafy commented 7 years ago

It was an error on my part... Did not configure the .htaccess the right way. Thanks for the reply.