The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Hey experienced vb hackers.
I used to hack UBB scripts all the time without too much of a problem although now it takes me HOURS to hack something ridiculously simple simply because it's php and I'm very new to php. I've gotten over a few hurdles but one of them is really puzzling me. How does one calculate time? I see all these numbers like this 962819438 And they make no sense to me. Can someone help me out? Thanks a bunch! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
That's a unix timestamp - amount of seconds from Jan 1, 1970 I think.
Go to http://www.php.net and check out the time/date functions (time() and date() specifically). |
|
#3
|
|||
|
|||
|
Ahhh that's what UNIX_TIMESTAMP meant! (in bold capitals nonetheless) I feel stupid! :P
thanks ed! |
|
#4
|
|||
|
|||
|
time() gives you the curretn tiem in that format. date() formats it to be readable
Code:
$Date = date($dateformat,$timestamp+(($timeoffset+$bbtimezoneoffset)*3600)); $Time = date($timeformat,$timestamp+(($timeoffset+$bbtimezoneoffset)*3600)); |
![]() |
|
|