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*