I am converting my local time in postbit and profile hack to vB3.5. The following code (with vB3.5 changes) worked fine in the member.php on vB3.0, but now it doesn't seem to want to work in 3.5 with the member_complete hook. Can someone please tell me why and what I need to change to get it to work now?
PHP Code:
// Local Date and Time in Post
global $vbulletin;
$this->post['tzoffset'] = $this->post['timezoneoffset'];
if ($vbulletin->userinfo['dstonoff'])
{
// DST is on, add an hour
$this->post['tzoffset']++;
if (substr($this->post['tzoffset'], 0, 1) != '-')
{
// recorrect so that it has + sign, if necessary
$this->post['tzoffset'] = '+' . $this->post['tzoffset'];
}
}
$this->post['localtime'] = date($this->registry->options['timeformat'], TIMENOW+($this->post['tzoffset']-$this->post['timeoffset'])*3600);
$this->post['localdate'] = date($this->registry->options['dateformat'], TIMENOW+($this->post['tzoffset']-$this->post['timeoffset'])*3600);
// Local Date and Time in Post