-1 years problem with topic_time (bbPress 1.0.2)
I’m creating a website with WordPress and bbPress that needs a section where someone can fill out an application form (from a WordPress page) and that will create a new topic in bbPress with the info they filled in.
We decided that the easiest way would be to have the form data submitted straight into the bbPress database.
I experimented with phpmyadmin by adding new records with the correct info in bbposts, increased the post counts in bbtopics and finally used the post time I’d set in bbposts (post_time) with topic_time to update the ‘freshness’. I used phpmyadmin’s default date/time selector to replicate the records’ formatting correctly.
While the new post showed up perfectly and the post counts were correct, the freshness came up as being “-1 years”
I changed the code in front-page.php to the following as outlined by _ck_ :
so that I could see what it was coming up with as the posted date and time. The results were… ‘interesting’ -
On mousing over the -1 years, I got the correct date and time.
On mousing over the correct freshness times of other posts I had made the same day, I got a date and time that seems to be 12 hours behind.
Here are the links to images outlining this:
Can someone please explain what is going wrong and if possible how to fix it or get around this problem with adding topics directly to the database. I’m starting to /facedesk so help would be much appreciated!!
You must be logged in to reply to this topic.