Author: evolver » Sun May 14, 2006 10:47 am
OK, I think I've got it right now... <img>
There's a function on functions.php that does the same thing:
function board2usertime
That was a good example to complete this code for every configuration...
[size=99px]
[size=99px]
REPLACE[code] // // GET THE TIME TODAY AND YESTERDAY // /*$today_ary = explode('|', create_date('m|d|Y', time(),$board_config['board_timezone'])); $board_config['time_today'] = gmmktime(0 - $board_config['board_timezone'] - $board_config['summer_time'],0,0,$today_ary[0],$today_ary[1],$today_ary[2]); */ $today_ary = explode('|', create_date('m|d|Y', time(),$board_config['board_timezone'])); $time_today_used = mktime(0,0,0,$today_ary[0],$today_ary[1],$today_ary[2]); $board_config['time_today'] = $time_today_used; if ( isset($userdata['user_timezone']) ) { $zonedifference = $board_config['real_board_timezone'] - $board_config['board_timezone']; $usersummertime = 0; $boardsummertime = 0; if($userdata['user_summer_time']) $usersummertime = 1; if($board_config['summer_time']) $boardsummertime = 1; $zonedifference = (($board_config['real_board_timezone'] + $boardsummertime) - ($board_config['board_timezone'] + $usersummertime)); $board_config['time_today'] = $time_today_used + ($zonedifference * 3600); } $board_config['time_yesterday'] = $board_config['time_today'] - 86400; //unset($today_ary); //-- end mod ]
Hope this helps for everyone now <!-- s]HERE[/url]
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Always remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.