K2_02
04-20-2009, 08:25 PM
I'm trying to pull the events from the calendar and display them on a custom PHP page. Here is my query:
SELECT eventid,event,dateline_from,dateline_to,title,dst FROM vb_event WHERE dateline_from >= ".$iTimeStamp." AND dateline_from <= ".($iTimeStamp+$addTime)." ORDER BY dateline_from ASC
Where iTimeStamp is today's date and iTimeStamp+addTime is so time in the future (30, 60 days, etc).
The date is coming out one day off on SOME events but not all. Even when checking the unix timestamp using a converter - the timestamp is wrong. How do I compensate for this or can someone please shed some light on how VBulletin stores these dates?
SELECT eventid,event,dateline_from,dateline_to,title,dst FROM vb_event WHERE dateline_from >= ".$iTimeStamp." AND dateline_from <= ".($iTimeStamp+$addTime)." ORDER BY dateline_from ASC
Where iTimeStamp is today's date and iTimeStamp+addTime is so time in the future (30, 60 days, etc).
The date is coming out one day off on SOME events but not all. Even when checking the unix timestamp using a converter - the timestamp is wrong. How do I compensate for this or can someone please shed some light on how VBulletin stores these dates?