Log in

View Full Version : Date & Time Stamp


Intex
01-05-2005, 12:13 PM
I'm using a hack that I need to modify to include a date / time stamp in the PHP code. It's essentially a chat facility, but unforunately it doesn't show the date / time when the user sends the message.

I've found the right place to put the code in the original php file, but I'm just not sure of the correct syntax.

If anybody could shed some light on it, that would be great :).

Xenon
01-05-2005, 01:23 PM
timestamps in vb are the default unixtimestamp,

you can use the TIMENOW constant for it, or if you need a special time/date take a look at mktime() function of php

Intex
01-06-2005, 09:33 AM
Thanks Xenon.

So would it be possible to use that as a BBCode, so it could be called any time?

rake
01-06-2005, 11:20 AM
I don't really know what you mean there, but timestamps which are basically, the number of seconds elapsed from the start of the unix era, can be formatted using the date function. Look that up on php.net

Intex
01-06-2005, 03:29 PM
OK, perhaps I'm not explaining it properly. Say, for example, someone creates a post as normal. In the text of that post they can put a BBcode or something that will trigger the display of the date and / or time at that particular position.