Solved: 3 Years, 7 Months, 2 Weeks ago $mybb->settings['dateformat'] NOT working properly.
#5
Solved: 3 Years, 7 Months, 2 Weeks ago
Why not just do the away=1 in the query as "AND away='1'"?

Can you check your database please to see if indeed the format of the returndate. My returndate is not unix timestamp. So you'll need to convert returndate to unix timestamp then run my_date() function.

This code is from member.php which shows the return date in the profile.
			// PHP native date functions use integers so timestamps for years after 2038 will not work
			// Thus we use adodb_mktime
			if($returnhome[2] >= 2038)
			{
				require_once MYBB_ROOT."inc/functions_time.php";
				$returnmkdate = adodb_mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
				$returndate = my_date($mybb->settings['dateformat'], $returnmkdate, "", 1, true);
			}
			else
			{
				$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
				$returndate = my_date($mybb->settings['dateformat'], $returnmkdate);
			}

			// If our away time has expired already, we should be back, right?
			if($returnmkdate < TIME_NOW)
			{
				$db->update_query('users', array('away' => '0', 'awaydate' => '0', 'returndate' => '', 'awayreason' => ''), 'uid=\''.(int)$memprofile['uid'].'\'');

				// Update our status to "not away"
				$memprofile['away'] = 0;
			}
		}
Reply


Messages In This Thread
RE: $mybb->settings['dateformat'] NOT working properly. - by labrocca - 2018-02-21, 08:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)