PDA

View Full Version : Can someone give me some pointers on VB time display?


14 Jul 2000, 22:37
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!

14 Jul 2000, 22:46
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).

15 Jul 2000, 00:34
Ahhh that's what UNIX_TIMESTAMP meant! (in bold capitals nonetheless) I feel stupid! :P

thanks ed!

15 Jul 2000, 09:52
time() gives you the curretn tiem in that format. date() formats it to be readable



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



that's how you get the time and date from $timestamp with the user's timeoffset he defined in his prefs.