Page 1 of 1

quick question

Posted: Sun Mar 29, 2009 9:45 pm
by frenchwr
I am reletively new to php and i have code that simply returns the server time as I need it to put it in an sql database

$cst = date('Y-m-d H:i:s');

how can i print off the time 168 hours(7 days later)?

does the MKtime function do this?

Re: quick question

Posted: Mon Mar 30, 2009 12:33 am
by requinix
mktime can do it, but strtotime is much easier to use.

If you want 168 hours then use that, because there will be a difference between it and "7 days" during two certain periods of the year...