The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Date/time functions
Hello Guys,
I'm working on a mod for my buddies forum and i want to use as much as the standard vbulletin build in functions as possible. This is my first mod for vbulletin so its not going to be 100% perfect and easy to install to other forums. Setitng up new pages, templates, using the wysiwg editor, db, etc functions isnt a problem. But i cant find out how the date and time functions work in vbulletin. I want to be able to display the dates in the timezones +DST from the users. Now i can build my own functons that saves the dates in GMT in the database and converts the date to the user timezone with the $vbulletin->userinfo['timezoneoffset'] variable, but i'm having trouble with the DST. What i want to do is use the build in date/time functions but i need to know : - what are the date/ time functions - In what format/timezone is it saved - how to convert them to the users timezone keeping in mind the DST settings of the user. If possible can somebody provide me some example codes? Thanks in advance! |
#2
|
|||
|
|||
Look at includes/functions.php, function vbdate(). It's basically the php date() function but it takes in to account user time zone and DST. I'm not sure but I think the php date() function takes care of DST automatically, but the vbdate() function uses the user profile field to allow it to be overridden.
There's also function fetch_time_data() in that same file which might have some useful info. |
#3
|
|||
|
|||
Thank you ill have a look at that.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|