So I understand how to use mktime()
to create a date based on the current date/time:
date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")+1
This creates a date exactly one year from now.
But how would I do this if I wanted to find out the date one year ahead of some fixed date? e.g. what will the date be 1 year in the future of the date 2017-10-01 23:59:59
You should use DateTime class. Nevertheless, this answer your question:
$time = strtotime('27-07-2017');
$date = date( 'Y-m-d H:i:s', mktime( date('H', $time), date('i', $time), date('s', $time), date('m', $time), date('d', $time), date('Y', $time)+1 ) );