Support Forum
So I'm still trying to troubleshoot this annoying as hell bug that we discussed in the beta thread. All posts and widget entries are showing up as -7 hours. The server's times is MST (UTC-7) WP is set to denver (UTC-7) SP is set to denver. When I look in WP the tiem is correct when it lists server tiem and local time. The only addins that are seeing the issue are buddypress and Simplepress. I've disabled plugins one at a time and nothing is causing the issue and I'm tearing my hair out at this point.
I started reverse looking up the code to see where SP pulls the time from and calculates the timezone change. However this doesn't make a lot of sense to my non-PHP knowing person. Below is where I traced it to within sp-api-common-display.php.
# Get current server date.time and adjuyst for users local timezone
$now = current_time('timestamp');
$now = sp_apply_timezone($now, 'timestamp');
$difference = $now - $unix_date;
Just for testing sake I took out the "$now = sp_apply_timezone($now, 'timestamp'); " and when a new post is made it shows the correct difference from current time, however it leaves me a little baffled. Why would this code take our server time (denver time, hosted through Godaddy) and then add -7 for the time zone? Shouldn't the code just take what WP is reposting as the current time? Why the heck would we be the only one seeing this issue? Why the heck is it just SP and BP seeing the issue?
*drinks heavily to make the hurting stop*
Lead site admin for RM40k.com
well the wp time and the actual server time should be the same... are you saying they are not? if so, sounds like the wp setting is wrong?
this seems to be generally working across the board... only a couple of issues that have not pointed at anything wrong yet...
but lets keep working through this...
Visit Cruise Talk Central and Mr Papa's World
That's the part that is baffling me, WP is reading the time correctly. On the Settings -> General page when set to Denver time it shows UTC time and Local time correctly. Another addon I have "Visitor maps and whos online" shows the correct timestamps for who is currently online. However anothing having to do with the forums or buddypress will show off by -7 hours. This causes most the forums to show -7 hours in seconds when displaying the difference value between the post time and current time.
With the line of code posted above I edited out the "$now = sp_apply_timezone($now, 'timestamp');" to test it and it then read the curernt time correctly when doing the difference time between current time and post time. Is there any easy way to tell 100% what the server time is set as? I can't find any listing in the the godaddy site offhand.
As always thanks a ton for working with me on this. It's literally the last real bug with my site and it proving to be insanely frustrating :/
Lead site admin for RM40k.com
do you have ssh access with godaddy?
if so, just execute a 'date' command...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)