PHP – Adding 1 hour to current time date(“Y-m-d H:i:s”)

$currentDatetime = date(“Y-m-d H:i:s”);

Returns always current datetime – 1 hour. You can change this to..

$currentDatetime = date(“Y-m-d H:i:s”,time()+60*60);

This will return + 1 hour to the current time.

Leave a comment