PDA

View Full Version : Which Time Function To Use?


paul41598
05-12-2009, 02:11 PM
I'm creating something where I can choose expiration date on threads. Basically the entire thing is working good, but my time function is off, or I'm doing something wrong.
The below is in my newpostcomplete hook. It puts in 1242169200 which translates to 23:00:00 GMT, but 07:00:00pm my time (eastern). What I want it to do is insert basically like 11:59:00pm into every single thread where I choose an expiry date.

how do I tackle this? I'm horrible with time stuff! :eek:


$thread_expiry = vbmktime(23, 0, 0, $vbulletin->GPC['thread_expiry']['month'], $vbulletin->GPC['thread_expiry']['day'], $vbulletin->GPC['thread_expiry']['year']);

Seven Skins
05-12-2009, 09:22 PM
It is fetching the date and time from server. find out what time zone your server is and adjust the date accordingly.