How do I edit the timezone?
Members who have visited (2) shows this (plugin)
Code:
if ($show['wvt'])
{
if ($vbulletin->options['wvt24'])
{
$cutoff = TIMENOW - 86400;
$whodesc = $vbphrase['visited_today_24'];
}
else
{
$whodesc = $vbphrase['visited_today'];
$tnow = date('YmdHis',TIMENOW - intval($vbulletin->options['hourdiff']));
$cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2));
}
$todaysusers = $vbulletin->db->query_read("
SELECT userid, lastactivity, options, username, user.usergroupid, displaygroupid,
groupa.opentag as opentaga, groupa.closetag as closetaga,
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " . TABLE_PREFIX . "user as user
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE lastactivity > " .$cutoff. " ORDER BY username
");
$totaltoday = 0;
unset ($whotoday);
while ($today = $vbulletin->db->fetch_array($todaysusers))
{
$totaltoday += 1;
$today['opentag'] = $today['opentaga'] ;
$today['closetag'] = $today['closetaga'] ;
if ($today['displaygroupid'])
{
$today['opentag'] = $today['opentagb'] ;
$today['closetag'] = $today['closetagb'] ;
}
$today[visible] = 1 ;
if ($today['options'] & $vbulletin->bf_misc_useroptions['invisible'])
{
$today['visible'] = 0 ;
if (($vbulletin->userinfo['permissions']['genericpermissions']
& $vbulletin->bf_ugp_genericpermissions['canseehidden'])
OR $today['userid'] == $vbulletin->userinfo['userid'])
{
$today['visible'] = 2 ;
}
}
if ($today['visible'])
{
$wrdate = vbdate($vbulletin->options['timeformat'], $today['lastactivity']);
$whotoday .= "<a href='member.php?u=$today[userid]' title='$wrdate' >";
if ($today['visible'] == 2)
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>*, ";
}
else
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>, ";
}
}
}
if ($whotoday)
{
$whotoday = substr($whotoday, 0, strlen($whotoday)-2);
}
else
{
$whotoday = $vbphrase['no_visitors'];
}
$search_text = '<!-- end logged-in users -->';
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,
$search_text.fetch_template('Display_Visitors'),$vbulletin->templatecache['FORUMHOME']);
}
I want the timezone to be Central US (GMT -4:00 if I'm not mistaken). Actually, I would rather
have it "last 24 hrs" if possible without clearing out the list of visited members on the 24th hour