The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I converted the last 10 posts hack, so I could place it on an ASP page... The problem is, the date is in Unix time. I can't find any code anywhere to make the conversion. It seems like something like this is close, but it's definitely missing something:
CDate("01-01-1970") + (1 / 24 / 60 / 60 * Unix_Date_Here) Does anyone have the correct formula? |
#2
|
|||
|
|||
<a href="http://www.php.net/manual/en/function.date.php" target="_blank">php.net/manual/en/function.date.php</a>
|
#3
|
|||
|
|||
Yes, thanks, but I need to do it without the use of any Perl/PHP functions...
|
#4
|
|||
|
|||
well, the unix time stamp is a tricky one to convert, however, if you look at my mood hack, it can be done very simply. I worked way to long on that little part to make it that simple, so i am not to inclined to give it away, but all you really need for a good push in the rite direction, is the link i just gave you.
Are you thinking of converting the time stamp using Java? Im not following why you wouldnt use the php standard, for a php hack, with anything else but php..... |
#5
|
|||
|
|||
OK... I will work on writing it out. I was just hoping someone had already done the work and was willing to share.
I'm placing it on an ASP page. |
#6
|
|||
|
|||
For anyone who may be wondering... this works:
CStr(CDate("01-01-1970" + (1 / 24 / 60 / 60 * dblUnixDate) - 7)) Replace dblUnixDate with the Unix Time Stamp. Replace -7 with the time zone offset. The only thing I still have to do is dynamically change the offset for daylight savings. Any ideas? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|