Current TIME and DATE of the SERVER

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rexmor
Forum Newbie
Posts: 3
Joined: Mon Aug 12, 2002 8:04 pm
Location: Philippines
Contact:

Current TIME and DATE of the SERVER

Post by rexmor »

Using PHP, how to get the Current TIME and DATE of the SERVER?

Thanks,

rex
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

rexmor
Forum Newbie
Posts: 3
Joined: Mon Aug 12, 2002 8:04 pm
Location: Philippines
Contact:

Post by rexmor »

I'm sorry I'm new to PHP
I do it like this...


<?php
echo(time());
?>

result is:
1029202885

Please correct me..
thanks.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

blue text in this forum is a link
time() takes you to the online manual entry for the time()-function
Description
int time ( void)
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
probably you're looking for date

make use of the manual as often as possible and see if there's something in the user contributed notes that helps you ;)
rexmor
Forum Newbie
Posts: 3
Joined: Mon Aug 12, 2002 8:04 pm
Location: Philippines
Contact:

Post by rexmor »

Thanks anyone here... you really helped people around... thanks for the link but anyway I been there in just a while... so it's here what I want... it's a simple as this...

$today = date("F j, Y, g:i:s a");


Thanks volka and this forum...

I'll be back ...

rex
Post Reply