I am trying to use the built in date function (created time) for my "from" date and I need to add one year to be a "to" date.
Here is the code in my PHP block:
$date = $this->date;
$validUntil = date('Y-m-d H:i:s', strtotime($date. ' + 1 year'));
return $validUntil;
Then in my Save function here is my code: {var:php43.validUntil}
I am assuming my PHP knowledge is lacking and my code has an error because the value I get when I try to save it is null.
Here is the code in my PHP block:
$date = $this->date;
$validUntil = date('Y-m-d H:i:s', strtotime($date. ' + 1 year'));
return $validUntil;
Then in my Save function here is my code: {var:php43.validUntil}
I am assuming my PHP knowledge is lacking and my code has an error because the value I get when I try to save it is null.