By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,723 Members | 1,876 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,723 IT Pros & Developers. It's quick & easy.

Time Stamps

The1corrupted
100+
P: 134
No matter what I do, I cannot wrap my head around time stamps... For instance..

[PHP]
$time=$_SERVER['request_time'];
[/PHP]
I think that's what it is... at any rate, how can I make a true time stamp with minutes and seconds?
Feb 24 '07 #1
Share this Question
Share on Google+
3 Replies


P: 99
No matter what I do, I cannot wrap my head around time stamps... For instance..

[PHP]
$time=$_SERVER['request_time'];
[/PHP]
I think that's what it is... at any rate, how can I make a true time stamp with minutes and seconds?
you have to use the date function.

[PHP]date('d-m-Y H:i:s',$time);[/PHP]
Feb 25 '07 #2

The1corrupted
100+
P: 134
Could I chop that down some like this:

[PHP]
date('i:s', $time);
[/PHP]
Feb 25 '07 #3

P: 99
Could I chop that down some like this:

[PHP]
date('i:s', $time);
[/PHP]
of course for more date function arguments check http://be2.php.net/manual/en/function.date.php
Feb 25 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.