Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Month/days not loading #81

Open
ykyu opened this issue Jan 26, 2016 · 5 comments
Open

Month/days not loading #81

ykyu opened this issue Jan 26, 2016 · 5 comments

Comments

@ykyu
Copy link

ykyu commented Jan 26, 2016

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
Copy link
Author

ykyu commented Jan 29, 2016

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
Copy link
Author

ykyu commented Jan 29, 2016

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
Copy link

geekafy commented Jul 26, 2017

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

Time table is already unsigned.

@ykyu
Copy link
Author

ykyu commented Jul 26, 2017

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
Copy link

geekafy commented Jul 26, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants