2011-03-25, 08:43 PM
Hello.
I have a website integrated with mybb forums. On my main website (not the forums), I want to display time in the user's localtime.
If I use the mybb function:
I believe that it should display my current time. However, the hour is out. So I tested $memprofile['timezone'] by using
And nothing was displayed. Not even a 0. I think I'm missing an include or something. Anyone knows what I'm missing? I only have:
Never mind. I found the problem. $memprofile was not defined. I thought about doing an include, but then I saw that it was basically the same as $mybb->user. So by replacing $memprofile with $mybb->user in the code above makes it work.
I have a website integrated with mybb forums. On my main website (not the forums), I want to display time in the user's localtime.
If I use the mybb function:
gmdate($mybb->settings['timeformat'],TIME_NOW + memprofile['timezone'] * 3600));
I believe that it should display my current time. However, the hour is out. So I tested $memprofile['timezone'] by using
echo $memprofile['timezone'];
And nothing was displayed. Not even a 0. I think I'm missing an include or something. Anyone knows what I'm missing? I only have:
require_once("mybb/inc/functions.php");
above the line where I called the date function.Never mind. I found the problem. $memprofile was not defined. I thought about doing an include, but then I saw that it was basically the same as $mybb->user. So by replacing $memprofile with $mybb->user in the code above makes it work.