The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to display proper date on external website
Hello!
I've been working on getting a simple news display script to properly display the time, but to not avail. I'm getting December 31, 1969 (UNIX epoch - 1). I'm doing a simple script that's just pulling all the newest entries in the thread table. It's getting the userid from the post table, and is displaying a custom field I made (that is meant for full/real name) from the userfield table (field5). The code worked perfectly fine with a vbb 3.5.4 installation, and I see no difference between the two, other than mysql table structure. Dateline is the same entity in both 3.5.x and 3.6.x I was decoding it using PHP Code:
$date would be called in my array as PHP Code:
I'm 100% sure it's not the server time, as I can successfully use PHP Code:
My best guess is that date() cannot do the math properly against the unix epoch, and it is returning as -1, hence December 31, 1969. The reason why? My best guess is that vbb 3.6 stores dateline in a new format that date() cannot properly read. Is my guess correct in saying that I must add a mathematical formula to have date() properly do the math against the epoch? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|