pub date |
[eluser]jmadsen[/eluser]
if you echo Code: $create_date = date("Y-m-d H:i:s"); you'll see you get a formatted date (ex., "2010-09-26 09:43:41"), so adding 180 to it doesn't make sense. There are two ways of adding onto dates, generally speaking: 1) convert your time to a timestamp and add 180 to that 2) break your date into its parts with date("Y"),etc; add +180 to the seconds part, then use mktime to turn it back into a formatted date. Dates are confusing to work with, but worth the time to get comfortable with. Start here http://php.net/manual/en/function.date.php and google a little for one of the many good tutorials on php date adding |
Messages In This Thread |
pub date - by El Forum - 09-25-2010, 05:41 PM
pub date - by El Forum - 09-25-2010, 06:53 PM
|