Quote:
Originally Posted by D3158
Yes, your afterthought is bang on. Put the current date and time on your machine and the date from the example URL: http://url.ca/date.php into a file.
|
Didn't see any date/time info at that link. Since php provides about as many ways to slice/dice the date/time as bash does it might be best to have a look at the php manual for the date function.
http://us.php.net/manual/en/function.date.php I've used this to datestamp sessions:
Code:
$month = date('m');
$day = date('d');
$year = date('Y');
$datestamp = $month."-".$day."-".$year;
This is pulled from the php manual:
Code:
Time --- ---
a Lowercase Ante meridiem and Post meridiem am or pm
A Uppercase Ante meridiem and Post meridiem AM or PM
B Swatch Internet time 000 through 999
g 12-hour format of an hour without leading zeros 1 through 12
G 24-hour format of an hour without leading zeros 0 through 23
h 12-hour format of an hour with leading zeros 01 through 12
H 24-hour format of an hour with leading zeros 00 through 23
i Minutes with leading zeros 00 to 59
s Seconds, with leading zeros 00 through 59
u Microseconds (added in PHP 5.2.2) Example: 654321
So:
Code:
$hours = date('H'); // Hours with leading zero's.
$minutes = date('i'); // Minutes with leading zero's.
Once again, I suggest looking at the php manual link. Lot's of options.!